In backtest OnTimer() not performs

Back to topics list To post a new topic, please log in or register
avatar
44
capilta 2014.02.19 17:37
 

Dear Guys

I write a code on OnTimer() . EA open trade on time. so i write this code on there. but when i try to backtest this EA all code within OnTimer() not work. How can i do some thing that OnTimer() code work on backtest.

Thanks.

avatar
Moderator
3206
angevoyageur 2014.02.20 19:12 #
 
capilta:

Dear Guys

I write a code on OnTimer() . EA open trade on time. so i write this code on there. but when i try to backtest this EA all code within OnTimer() not work. How can i do some thing that OnTimer() code work on backtest.

Thanks.

What is the meaning of "not work" ? Not executed or you don't get the expected results or ... ?

avatar
44
capilta 2014.02.21 03:34 #
 
angevoyageur:
What is the meaning of "not work" ? Not executed or you don't get the expected results or ... ?


All the code within OnTimer() not executed.
avatar
Moderator
6149
stringo 2014.02.21 07:13 #
 
OnTimer, OnChartEvent processing not implemented yet in the Tester
avatar
250
ffoorr 2014.02.25 15:10 #
 
So the OnTimer(), work or don't work in the tester ?
avatar
Moderator
3206
angevoyageur 2014.02.25 18:07 #
 
ffoorr:
So the OnTimer(), work or don't work in the tester ?
The answer from stringo is very clear. OnTimer don't work in the Strategy Tester.
avatar
26
chaeljc 2014.03.22 13:07 #
 

in addition to stringo's information, does anyone know when OnTimer and OnChartEvent will be implemented in the Tester? Even an target implementation date / time period would be helpful.

Many thanks for any advice.

avatar
19
Toriacht 2015.09.30 15:40 #
 
chaeljc:

in addition to stringo's information, does anyone know when OnTimer and OnChartEvent will be implemented in the Tester? Even an target implementation date / time period would be helpful.

Many thanks for any advice.

+1 for this. Any implementation plans?
avatar
5
NickF 2016.05.29 06:28 #
 
It would  be nice to be able to run the backtester with code in OnTimer() function - some brokers only provide trading with MQL4, not with MQL5. 
avatar
13009
WHRoeder 2016.05.29 16:30 #
 
Toriacht: Any implementation plans?

The tester doesn't run in real time, you can speed it up (32x,) and you can pause the creation of ticks and you can skip all ticks for a bar. How should the period of OnTimer change for those three scenarios?

Not likely to every run in the tester. Just check in OnTick for the tester and do the functionality. Same as Chart Event For MT4 Backtester (Migel) - MQL4 forum

enum Terminal_Mode{  MODE_LIVE, MODE_VISUAL, MODE_OPTIMIZER};
/// @returns terminal mode.
Terminal_Mode     get_modus_operandi(void){
   if(!IsTesting() )          return MODE_LIVE;
   if( IsVisualMode() )       return MODE_VISUAL;
                              return MODE_OPTIMIZER;
}
Back to topics list  

To add comments, please log in or register