Skip to content
All library documents

Moving Average Cross Alerts for MT4 Trading

Article MQL5 code base

Summary

This document explains an MT4 indicator that alerts traders when price crosses a moving average and can mark those crosses with chart arrows and labels. It supports several average types, selectable price inputs, and configurable periods. Notifications can appear on screen or be sent to mobile devices and email, subject to platform setup.

The signal can use the current candle for faster alerts or wait for the previous candle to close across the average. The former may change before the candle closes; the latter is slower and may produce fewer false signals. Examples describe using a 50-period EMA for trend-following and a 200-period SMA to watch for possible reversals, as well as comparing signals across timeframes. These are illustrative use cases, not performance evidence. The document gives no backtest results and does not establish that a crossover predicts profitable trades. Crosses can whipsaw, so the indicator is best understood as a notification and charting aid that still requires independent strategy evaluation.

Key ideas

  • The indicator can alert when price crosses a selected moving average and mark the event on the chart.
  • It supports SMA, EMA, smoothed, linear weighted, and Hull moving averages.
  • Using the current candle gives earlier signals but may cause them to change before close.
  • Waiting for a candle close confirms the cross but can delay the signal.
  • The examples illustrate trend-following, reversal, and multi-timeframe uses without reporting performance tests.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.