- Can't be done. You need 100 values to compute the SMA(100). You can only compute the last SMA(100) with 100 bars of data.
- Why do you need to compute it? Just get it from the indicator. iMA - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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
I use CopyClose() to create an array containing the Close price of the last 100 bars. How can I create an array containing a Moving Average for the last 100 bars?