Download MetaTrader 5
To add comments, please log in or register
Share your programs. That will improve your rating.
ForexTrader17
1042
ForexTrader17 2016.02.03 03:20 

Is it possible to exclude bars that start at a certain time in an EA? For example if a backtest shows that trades on H! bars of 13, 14, 15, 17,21 and 23 did not do well then how do I exclude them in an EA?

Thanks. 

Stuart Browne
5721
Stuart Browne 2016.02.03 03:29  
ForexTrader17:

Is it possible to exclude bars that start at a certain time in an EA? For example if a backtest shows that trades on H! bars of 13, 14, 15, 17,21 and 23 did not do well then how do I exclude them in an EA?

Thanks. 

Just check the open time at the start of a new bar. If it's on your "ignore list", don't take the trade.
ForexTrader17
1042
ForexTrader17 2016.02.08 20:10  

So should I use the function TimeHour then? And how do I exclude only certain hours when signal is given?

Thanks. 

/
To add comments, please log in or register