Change Time Frame when trade opens.

 

Can a EA be coded to change the time frame when a trade is opened

and then return to the original time frame when the trade closes?

 
C.D.M: Can a EA be coded to change the time frame when a trade is opened and then return to the original time frame when the trade closes?

Do you mean, to change the time-frame of the chart it is attached to?

Then yes, it can, but be very careful, as this will cause to EA and all indicators, to reset and restart. Unless the EA is properly coded to take this into account it can cause many issues.

However, EAs can be "blind", so instead, just have the EA collect the data from both time frames as it needs to, instead of changing the timeframe on the chart.

The trades themselves, however, are not associated with any time-frame.

 
Doesn't need to be an EA. A simple indicator can check for opened order/position, change TF when necessary.
 
Fernando Carreiro #:

Do you mean, to change the time-frame of the chart it is attached to?

Then yes, it can, but be very careful, as this will cause to EA and all indicators, to reset and restart. Unless the EA is properly coded to take this into account it can cause many issues.

However, EAs can be "blind", so instead, just have the EA collect the data from both time frames as it needs to, instead of changing the timeframe on the chart.

The trades themselves, however, are not associated with any time-frame.

Ok Thanks.