Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Portable Moving Average - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resource

author EAcpu | 5 reads | 0 comments |

Portable Moving Average - indicator for MetaTrader 5

Portable Moving Average - indicator for MetaTrader 5

This is just an indicator that professionally instantiates the Moving Average and makes the code very portable so that it can be copied and pasted into larger indicator projects.

This is educational code for beginners. In a script, the moving average is calculated from the oldest data to the newest data, and in the series version, the moving average is calculated from the newest data to the oldest data.

The moving average is calculated in a function call within OnCalculate. This is nothing fancy, just to create organization and portability. You can use any mql indicator function to do this.

Portable Moving Average - indicator for MetaTrader 5


Attachment download

📎 portable_moving_average.mq5 (4.26 KB)

📎 portable_moving_average_tseries_versioni.mq5 (4.39 KB)

Source: MQL5 #55622

Verification code Refresh