And both of these function still won't work in Strategy Tester, am I right?
Just in case you are using MT4/MQL4 (and not MT5/MQL5), and you have posted in the wrong section, please note that Timer events are NOT simulated in MT4's Strategy Tester.
Event Handling in the Tester
The following events are handled in the Strategy Tester: initializing an Expert Advisor before a single run of OnInit(), deinitializing an Expert Advisor after a single run of OnDeInit() and simulating a new tick OnTick().
In addition, Tester event handled in OnTester() function is generated before calling OnDeInit() deinitialization function after testing a trading robot on historical data. The value returned by this function is used as a Custom max criterion when optimizing the input parameters.
Timer and ChartEvent events are not handled in the Strategy Tester
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I try to increase my variable secondCounter in every second, does my code here work?
And both of these function still won't work in Strategy Tester, am I right?
Thanks.