Create an array containing a Moving Average for the last 100 bars
- 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
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?