You have a divide by zero error . . . when would this equal zero ?
iMA(NULL,0,SMASlow,0,0,0,Count)
Hi,
It should never be zero. There it is the problem. I have tried many ways to avoid this error, but it keeps there.
The indicator should calculate the difference between 2 moving averages in a percentage way.
The formula is: Absolute value( 100*(FastMA-LowMA)/LowMA).
Do you know how to fix the buffer in order to plot this formula?
Thanks
RaptorUK:
You have a divide by zero error . . . when would this equal zero ?
when count = Bars-1 .. Bars-SMASlow
You have a divide by zero error . . . when would this equal zero ?
iMA(NULL,0,SMASlow,0,0,0,Count)

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
Hi,
I come fron another platform and language, so I am new in MQL4.
This is a really simple version of the RAVI indicator. It is giving me some error when I try to load it in the chart.
I would appreciate if someone could fix it for me, so I could learn the right procedure.
The indi is only a Line with this formula: MathAbs(100*(iMA(NULL,0,SMAFast,0,0,0,Count)-iMA(NULL,0,SMASlow,0,0,0,Count))/iMA(NULL,0,SMASlow,0,0,0,Count)).
Tanks a lot in advance