Skip to content
All library documents

ZigZag Trendline Breakout Trading with Moving Average and Cycle Filters

Article MQL5 code base

Summary

This MetaTrader expert advisor describes a forex strategy that enters after a candle closes beyond a trendline connecting recent ZigZag peaks or troughs. Buy and sell rules mirror one another. A moving average filter requires price to be on the matching side of the average, and positions can close when price crosses it. A cycle filter restricts entries to the latter half of a measured swing.

The system also includes stop loss and take profit settings, breakeven and trailing stop controls, and a Friday cutoff that can close trades below a specified profit threshold. These are configurable strategy components, not evidence of profitability. The document supplies parameter descriptions but no backtest results, market, timeframe, or performance analysis. The ZigZag-based swing points and trendlines may also depend on indicator settings, so their behavior and any signal stability require independent evaluation.

Key ideas

  • Entries follow candle-close breaks of trendlines drawn from recent ZigZag swing points.
  • A moving average filter conditions entries, and a moving average crossing can close positions.
  • A cycle filter limits breakouts to the second half of a measured swing.
  • Breakeven, trailing stops, fixed exits, and Friday trade controls are configurable.
  • The document provides no performance evidence or testing details.

Tags

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