Result of EMA
Did you try to read the documentation ?
Returned value
Returns the handle of a specified technical indicator, in case of failure returns INVALID_HANDLE. The computer memory can be freed from an indicator that is no more utilized, using the IndicatorRelease() function, to which the indicator handle is passed.
See this article https://www.mql5.com/en/articles/31
- 2010.03.18
- Sergey Pavlov
- www.mql5.com
when i want to use this code from the MovingAvarege.mqh
double ExponentialMA(const int position,const int period,const double prev_value,const double &price[]) { //--- double result=0.0; //--- calculate value if(period>0) { double pr=2.0/(period+1.0); result=price[position]*pr+prev_value*(1-pr); } //--- return(result); }
what its meaning with
const int position: ??
const int period: is this Period_D1 and others ???
const double prev_value: ??
const double &price[]: is this PRICE_CLOSE ????
Hello,
i try to run my EA on a 1H chart, but i calculate an EMA on daily basis,
so i use this code to get the daily EMA
The interresting thing,
EMA500 result is 10
EMA501 result is 11
does anyone have an idea whats wrong?
amando