loop moving averge
Hello
I am a beginner in mql5 and I block on a piece of code ...
I am looking to loop on 2 moving averages to know a
trend but the results are always zero. Can you tell me if my code is correct or not please
Mql5 iMA() returns a handle, check out https://www.mql5.com/en/docs/indicators/ima.
- www.mql5.com
no its not correct
you have to do the handle of indicator in OnInit and CopyBuffer in OnTick.
The values for MA will be written in an Array. this Array you have to define on Global space.
Even you have to set ArrayAsSerias in OnInit.
your Style if from MQL4, this not working on MQL5
Hello
I am a beginner in mql5 and I block on a piece of code ...
I am looking to loop on 2 moving averages to know a trend but the results are always zero. Can you tell me if my code is correct or not please