Var Mov Avg MetaTrader indicator — although it is based on a moving average, it doesn't use any standard MT4/MT5 moving average indicators. It uses its own formula to calculate the moving average with a complex noise filter to produce more accurate signals. The indicator displays dotted line in the main chart window exactly over the price curve. The changing colors of the dots signal trend changes. The indicator supports all types of alerts on trend changes. The indicator is available for both MT4 and MT5.
- periodAMA (default = 50) — the period of the main custom moving average. Unlike with other MAs, the higher this number is the less smooth is the line.
- nfast (default = 15) — the first noise filter parameter. Higher values make indicator less sensitive to spikes.
- nslow (default = 10) — the second noise filter parameter. Higher values make indicator less sensitive to spikes.
- G (default = 1.0) — the power of filtered part in the moving average. Another way to make the moving average line smoother.
- dK (default = 0.1) — configures signal sensitivity — higher values mean fewer signals.
- EnableNativeAlerts (default = false) — if true, a native MetaTrader popup alert will be used when a buy signal appears.
- EnableEmailAlerts (default = false) — if true, an email message will be sent when a buy signal appears. Email should be properly configured in MetaTrader via Tools->Options->Email.
- EnablePushAlerts (default = false) — if true, an email message will be sent when a buy signal appears. Notifications should be properly configured in MetaTrader via Tools->Options->Notifications.
- TriggerCandle (default = Previous) — the candle to issue alerts on: Previous — the most recently closed candle or Current — the yet unfinished candle.
Example and strategy
When the dots are red, the price is in the downtrend. When the dots are green, the price is in the uptrend. Buy when red changes to green and sell when green changes to red. Use moderate stop-loss to protect yourself from false signals.
Downloads (ver. 1.01, 2022-04-07)
Var Mov Avg for MetaTrader 4 in .zip
Var Mov Avg for MetaTrader 4 in .mq4
Var Mov Avg for MetaTrader 5 in .zip
Var Mov Avg for MetaTrader 5 in .mq5
Do you have any suggestions or questions regarding this indicator? You can always discuss Var Mov Avg with the other traders and MQL programmers on the indicators forums.
1.01 - 2022-04-07
- Added all types of alerts — native (popup), email, and mobile notifications.
- Changed the indicator to calculate at each tick (was on each new bar previously).
- Optimized it to not recalculate old bars.
- Removed unnecessary pieces of code.