I was wondering how can I get the current value of the 90 day exponential MA?
Is it this:
test90 = iMA(NULL,PERIOD_H1,90,0,MODE_EMA,PRICE_MEDIAN,0);
? is it the right equation?
Is it this:
test90 = iMA(NULL,PERIOD_H1,90,0,MODE_EMA,PRICE_MEDIAN,0);
? is it the right equation?
Most likely not because your time frame is H1, meaning that your bars are separated by 1 hour.
The shift is specified in bars.
So 90 bars would be sifting 90 hours from the current bar i=0
So you should multiply 90 by 24 or change time frame to D1
test90 = iMA(NULL,PERIOD_H1,90*24,0,MODE_EMA,PRICE_MEDIAN,0);
or
test90 = iMA(NULL,PERIOD_H1,0,0,MODE_EMA,PRICE_MEDIAN,90*24);
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
Is it this:
test90 = iMA(NULL,PERIOD_H1,90,0,MODE_EMA,PRICE_MEDIAN,0);
? is it the right equation?