for (int i = 0; i <= totBars; i++) {You can't get Bar zero data for other timeframes/pairs in the tester Testing Features and Limits in MetaTrader 4 - MQL4 Articles
WHRoeder:
You can't get Bar zero data for other timeframes/pairs in the tester Testing Features and Limits in MetaTrader 4 - MQL4 Articles
You can't get Bar zero data for other timeframes/pairs in the tester Testing Features and Limits in MetaTrader 4 - MQL4 Articles
Hei WHRoeder, thanks for the article. Does it mean that I cannot test this EA? This system checks what was the reading of the Sar on the highest timeframe (shift + 1) and after that checks the bar forming on 4H and 1H.
Am I wrong ?
zen4x:
Hei WHRoeder, thanks for the article. Does it mean that I cannot test this EA? This system checks what was the reading of the Sar on the highest timeframe (shift + 1) and after that checks the bar forming on 4H and 1H.
Am I wrong ?
Another thing I forgot to mention is that if I test that code as indicator using Forextester the indicator works fine.
Guys I am still trying to understand the error I got. Basically I noticed that one mistake was the loop I wrote I changed the condition
for (int i = 0; i <= totBars; i++) { } to for (int i = 0; i < totBars; i++) { } The problem left is a little gap of 10 minutes 2 bars, on the 5 minutes timeframe. The indicator stops painting any signal but for other 2 bars I got a signal. Also I wanted to ask if I should try to rewrite the indicator using ArrayCopySeries instead ibarshift ? Thanks in advance.

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
Hello guys. I wanted to understand why I get different results using a multi timeframe indicator code to develop an EA. Basically I have written a quite simple code to check the Parabolic Sar over three different timeframes. The indicator seems to work fine in accordance with the logic, instead when I run the code into the EA, the EA seems working differently from the data the indicator shows.
When I run the EA and plot the indicator to have a visual check of what the EA can see, the EA shows a downtrend even if the indicator leaves short[i] buffer to its empty value 0. The same is true for long.
Is there any detail that I am missing about the way I get data from different timeframes ?
Thank you in advance.