no one know it ?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Original iMA = 1.39742423
my ima = 1.39726915
and this give different value to my ea.
Any idea on why this different value ?
I use timeframe 1H
Thank you !
int Periodo = 10;
double iMA1 = iMA(NULL, 0, Periodo, 0, MODE_EMA, PRICE_HIGH, 0);
double Result[200];
double pr=2.0/(Periodo+1);
for(int i=Periodo-1; i>=0; i--)
{
if(i==Periodo-1)
Result[i+1]=High[i+1];
Result[i]=High[i]*pr+Result[i+1]*(1-pr);
}
double iMA2 = Result[0];
com = "iMA1 :"+iMA1+"\n"+"iMA2 :"+iMA2+"\n";