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
In MQL4, the latest data number is 0, but in MQL5, it's the oldest one.
You should consider that point to get a correct result.
The first your program doesn't work correctly because it's for MQL5.
Regarding "for" statement, usually the same result is obtained in either direction, but in rare cases, it can not be calculated in the opposite direction.
I think this is an example.