Download MetaTrader 5
To add comments, please log in or register
Download documentation as one file. It is easy!
Brian
498
Brian 2014.01.28 19:46 

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.

qjol
3243
qjol 2014.01.28 19:57  
it depends on your code

changing time frames by code

Brian
498
Brian 2014.01.29 03:46  

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.

qjol
3243
qjol 2014.01.29 07:05  

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

whroeder1
14239
whroeder1 2014.01.29 14:36  
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.
Brian
498
Brian 2014.01.30 10:04  
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.
Brian
498
Brian 2014.01.30 10:12  
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

/
To add comments, please log in or register