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

MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors
- 2010.03.18
- Sergey Pavlov
- www.mql5.com
In order to obtain values of a built-in or custom indicator in an Expert Advisor, first its handle should be created using the corresponding function. Examples in the article show how to use this or that technical indicator while creating your own programs. The article describes indicators that are built n the MQL5 language. It is intended for those who don't have much experience in the development of trading strategies and offers simple and clear ways of working with indicators using the offered library of functions.
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 ????

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,
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