hematinik:
I was converting my own indicator from MQL4 to MQL5 and while I'm pretty good at both standards, the result in MQL5 was wildly different. the culprit was some uninitialized local variables inside loops, that which worked well under MQL4 but crazy under MQL5.
Always explicitly initialize local variables or else MQL will surprise you again.
if i am not mistaken, the ide does give you a warning of this when you compile it.
Big lession: Always assign the value to the variable before using it

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 was converting my own indicator from MQL4 to MQL5 and while I'm pretty good at both standards, the result in MQL5 was wildly different. the culprit was some uninitialized local variables inside loops, that which worked well under MQL4 but crazy under MQL5.
Always explicitly initialize local variables or else MQL will surprise you again.