![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
Hello,
I am very new here and want to practice a bit in coding. I decided to write a moving average.
Writing from scratch is hard so I pull up an ema script people writes.
There is this line
inpPrice = PRICE_CLOSE
_ema.calculate()getPrice(inpPrice,open,high,low,close,i)
I would like to know what
_ema.calculate()getPrice()
do, why don't we just use open high low and close themselves to calculate?
Let say I want to manipulate the open high low and close before feeding into the moving average function, can I just change the arguments in getPrice(inpPrice,open,high,low,close,i)?
Here is the ema code I found online:
https://www.mql5.com/en/code/25047