converting iMA from mql4 to mql5
Please read the MQL5 documentation on the iMA() function (there is an example) — Documentation on MQL5: Technical Indicators / iMA
There are also examples in the CodeBase. Here is one — Moving average code for beginners by William210
Simply put, you obtain the Indicator's handle in the OnInit() event handler, and then later in the event handlers, you use CopyBuffer to obtain the values.
double maValue = maArray[0]; // 5) Return the moving average
We can now use maValue to return our moving average
I understand that the previous syntax was this
and assuming i want values like this:
how do i exactly key in into the sql5 syntax?
thank you.