Skip to content
All library documents

MACD Signals with an MA Trend Filter and Trailing Stops

Article MQL5 code base

Summary

This Expert Advisor combines a moving average with MACD. The moving average acts as a trend filter, while MACD provides trading signals. When a new signal calls for an opposite position, it also serves as the instruction to close the existing position.

Position size can be configured as a fixed lot amount or set dynamically using a risk percentage. Open positions use a trailing stop. The description gives no indicator settings, entry thresholds, market or timeframe, backtest results, or risk analysis, so it outlines the mechanics without evidence of performance. The method should be treated as a strategy specification rather than a validated trading system.

Key ideas

  • The moving average filters trades according to the prevailing trend.
  • MACD is used to generate position signals.
  • An opposite signal also closes the current position.
  • Position sizing can use fixed lots or a risk percentage.
  • A trailing stop manages open positions.

Tags

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