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

Multiple Average Filter - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Multi pass average filter - indicator for MetaTrader 5

Multi pass average filter - indicator for MetaTrader 5

Multi pass average filter - indicator for MetaTrader 5

In theory, almost anything that averages can be a digital filter (it just has to find the corresponding coefficients - sma , for example, the coefficients are all "1"), but this indicator goes straight into that category, even though it doesn't use coefficients in this version. There are two main reasons for avoiding coefficients in this version: code simplicity and efficiency. The basis of it all is that the good old simple moving average is calculated slightly differently than the usual "sum them all and then divide" to avoid nxn complexity (which will slow down your computer significantly when this indicator works), that's why it doesn't look like a "classic" digital filter.

limit:

The maximum transfer value allowed by the indicator is 10. To change it, change line 4 of the code as follows:

 #define_maxPass 10

and replace "10" with the desired maximum number of passes (in the released version, the limit remains at 10 for practical reasons)

You can use color changes as signals. It is highly recommended to experiment with some of the best passes for your trading style (see the "big picture" example for reasons why you should experiment). Also, note that pass 1 makes the indicator value the same as the SMA (Simple Moving Average). The difference is a different channel than 1, so the best usage is probably to use a shorter ma period and then try different channel parameters

Multi pass average filter - indicator for MetaTrader 5

"Big picture" example:

10 instances of the indicator with default parameters, except that the number of passes is changed from 1 to 10

Multi pass average filter - indicator for MetaTrader 5


Attachment download

📎 multi_pass_moving_average_filter.mq5 (9.03 KB)

Source: MQL5 #22475

Verification code Refresh