Probably I need to put the EMA into an array and then calculate the EMA of it with iMAOnArray
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
Hello everyone!
I need the values of MACD calculated like they are in the ZeroLAG MACD indicator
"ZeroLAG MACD calculates on formula:"
ZeroLAG MACD(i) = (2*EMA(Close, FP, i) - EMA(EMA(Close, FP, i), FP, i)) - (2*EMA(Close, SP, i) - EMA(EMA(Close, SP, i), SP, i));
ZeroLAG MACD Signal(i) = 2*EMA(ZeroLAG MACD(i), SigP, i) - EMA(EMA(ZeroLAG MACD(i), SigP, i), SigP, i);
where:
EMA - exponential moving average;
Close - a price of the closing of the bar;
FP - a period of the quick moving average;
SP - a period of the slow moving average;
SigP - a period of the signal moving average;
I don´t know how to programm an EMA of an EMA. An option would be to use icustom and to receive the values frome the indicator, but I need to understand the calculation for using it in my EA.
Thanks in advance!