Perhaps you should read the manual. Start with iMA - Technical Indicators - MQL4 Reference and iMAOnArray - Technical Indicators - MQL4 Reference
No idea what hlc3 is, but PRICE_TYPICAL is (H+L+C)/3
No idea what ExpAverage is, but MODE_EMA is Exponential averaging.
You will need buffers for esa, |ap-esa|, d, ci, tci.
iMA - Technical Indicators - MQL4 Reference
- docs.mql4.com
iMA - Technical Indicators - MQL4 Reference
In MetaEditor's Navigator Include/MovingAverages.mqh you can see the averaging formulas used in MQL*.
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
I wanted to convert ExpAverage in thinkorswim to mql4 function. I cannot seem to find any argument to iMA function which takes source. any idea?
I want to convert following small code to Mql4
def ap = hlc3;
def esa = ExpAverage(ap, 10);
def d = ExpAverage(AbsValue(ap - esa), 10);
def ci = (ap - esa) / (0.015 * d);
def tci = ExpAverage(ci, 21);