changing time frames

 

Hello,

If an EA is running on a certain time frame can I switch time frames or will this disrupt things. At the moment I am running an EA that is designed to continuously manage positions and re enter new positions if we are stopped out. Switching time frames seems to mess things up.

Thanks.

 
it depends on your code

changing time frames by code

 

Thanks, this is very helpful. I am not a programmer but at least I can give this to someone programming for me.

So just to be very clear for us non-programmers :-), unless it is programmed, I should never switch time frames while an EA is running? Is this correct?

Thanks again.

 

example, say you have 2 strategies on the same Symbol() the first is PERIOD_H4 related, & the second is related 2 PERIOD_H8... (just n example) & using Period() to detect them...

But... if u write the code properly u shouldn't have a problem 2 change TF's

 
4000: If an EA is running on a certain time frame can I switch time frames or will this disrupt things.
  1. When you change timeframes, the EA goes through a deinit/init cycle, nothing more. Global and static variables are not reset. You must code to recover.
  2. How are you "continuously manage positions?" If it's based on period (ima, atr, etc) then everything has changed. Do you change to the new TF values, or continue managing using the original TF. Do you detect the change with MNs?
  3. "Switching time frames seems to mess things up" If you aren't handling the above, don't switch.
 
qjol:

example, say you have 2 strategies on the same Symbol() the first is PERIOD_H4 related, & the second is related 2 PERIOD_H8... (just n example) & using Period() to detect them...

But... if u write the code properly u shouldn't have a problem 2 change TF's


Thanks very much.
 
WHRoeder:
  1. When you change timeframes, the EA goes through a deinit/init cycle, nothing more. Global and static variables are not reset. You must code to recover.
  2. How are you "continuously manage positions?" If it's based on period (ima, atr, etc) then everything has changed. Do you change to the new TF values, or continue managing using the original TF. Do you detect the change with MNs?
  3. "Switching time frames seems to mess things up" If you aren't handling the above, don't switch.


Hi,

Thanks for your help. This is all a little beyond my ability but I will pass it on to the programmer.

Regards

Reason: