Hello all,
I need to calculate iMA from custom values, for instance Open-Close.
I was able to get this only by creating a separate indicator that calculates Open-Close values.
Partial code:
Is there a way to avoid using this former separated file?
Hello aecioneto,
please take a look at ENUM_APPLIED_PRICE.
After looking at it, please try, for instance, this:
hma = iMA(_Symbol, 0, per, 0, MODE_LWMA, PRICE_OPEN);
Regards,
Malacarne
Hello aecioneto,
please take a look at ENUM_APPLIED_PRICE.
After looking at it, please try, for instance, this:
Regards,
Malacarne
Thanks for the reply, but this is different from what I need.
Instead of just MA of PRICE_OPEN, I need MA of Open-Close (Open MINUS Close).
Thanks for the reply, but this is different from what I need.
Instead of just MA of PRICE_OPEN, I need MA of Open-Close (Open MINUS Close).
There is 2 solutions: 1° The one you used.
2° Use SimpleMAOnBuffer() or similar from MovingAverages.mqh.
Hello all,
I need to calculate iMA from custom values, for instance Open-Close.
I was able to get this only by creating a separate indicator that calculates Open-Close values.
Partial code:
Is there a way to avoid using this former separated file?
Thank you for posting this question. I am dealing with the same situation and now I see that I need to use a custom indicator.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello all,
I need to calculate iMA from custom values, for instance Open-Close.
I was able to get this only by creating a separate indicator that calculates Open-Close values.
Partial code:
Is there a way to avoid using this former separated file?