Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Usually the Heiken Ashi is a multi-buffer indicator displayed as candles plot, and as such, cannot be used as the "applied price" for another indicator.
Forum on trading, automated trading systems and testing trading strategies
How to code Moving Average applied on Bollinger Bands
Fernando Carreiro, 2023.10.11 22:34
To summarise the issue ...
Currently MQL5 does not offer a method to redirect secondary plots to the "applied price" parameter of an indicator function. It only works with the primary plot.
Possible work-arounds (can't be classified as solutions) ...
- To collect the data from the secondary plots via the CopyBuffer function and then apply a moving average using the functions in in "MovingAverages.mqh" (for the moving average example).
- To break-down the calculations of the original multi-plot indicator, and then use the "applied price" method on the elementary indicator functions.
Also, neither of the above two work-around are ideal, or efficient or even generic.
There may be other work-arounds that have not yet been proposed or discussed.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm currently learning how to apply moving average with indicators values. For example, in below code I am trying to have moving average data for Heiken Ashi indicator value.
But when Checking the value of boat moving average it appears to be same. What should I do to pass a indicator value to the moving average function iMA().