billworld:
There are limited bars available prior to the start date in the Strategy Tester, so start the test earlier and wait for a few hundred bars to pass. . . . then allow your EA to run. This way you will have more bars to the left.
I'm unable to figure out why MT4 strategy tester is having issues properly realizing moving averages based on high periods (such as 1000 or more bars). I've tried both iMA as well as iCustom (referencing the provided Moving Averages function and the printed results (just printing the MA price for a specific bar to the journal) differs than what I see in the Data Window for the same bar for the same MA. At the 1000 bars period the difference can be a few pips and the difference grows as the period increases. At 1400 bars the difference (between iMA/iCustom in the EA vs what's on screen) is over 10 pips.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm unable to figure out why MT4 strategy tester is having issues properly realizing moving averages based on high periods (such as 1000 or more bars). I've tried both iMA as well as iCustom (referencing the provided Moving Averages function and the printed results (just printing the MA price for a specific bar to the journal) differs than what I see in the Data Window for the same bar for the same MA. At the 1000 bars period the difference can be a few pips and the difference grows as the period increases. At 1400 bars the difference (between iMA/iCustom in the EA vs what's on screen) is over 10 pips.
The difference is lessened after a few days into the backtest results (on M5). So I figure this means that the strategy tester isn't recognizing the correct MA levels until the prerequisite number of bars passes (even for EMA MA method). Is this correct and is there any workaround for this? I need for my backtests to be accurate and need to come up with a solution to this problem.
I guess I could insert a param for testing purposes for the month number to test and then set the start time period to a week prior to the start of the month. Is that what others do to overcome this issue?
Thanks for any help.