Skip to content
All library documents

Building Support and Resistance Lines from ZigZag Extremes

Article MQL5 articles

Summary

The article describes an indicator and trading system that automatically draws support and resistance lines from local price highs and lows detected with the ZigZag indicator. It selects candidate turning points, then filters lines using segment proportions and length, slope, proximity to current price, and the number of price crossings. The resulting lines are intended to show levels that remain relevant and unbroken near the latest bars. Traders can use them to enter near support or resistance in the direction of a broader trend, or trade a line break; the accompanying Expert Advisor includes configurable entry modes and filters.

The article reports optimization results for 13 currency pairs using 2017 data and a 0.1 lot size, with different parameter combinations producing varied profit, drawdown, and trade statistics. It concludes that results depend on the instrument and that breakout trading outperformed pullback trading for some currencies. These are historical, optimized tests; the author recommends selecting parameters for each instrument, and the results do not establish future profitability.

Key ideas

  • The indicator uses ZigZag turning points as candidate anchors for support and resistance lines.
  • Line filters include segment proportions, length, slope, price crossings, and distance from current price.
  • The lines can inform trend-following entries near a level or countertrend entries after a break.
  • The reported currency-pair tests show instrument-specific outcomes and do not guarantee future results.

Tags

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