Skip to content
All library documents

Objective Swing-Based Trendlines from Raw Price Action

Article MQL5 articles

Summary

This article presents a rule-based method for drawing sloped support and resistance trendlines from price swings detected directly in raw price data. It describes identifying local swing highs and lows, filtering them by size relative to volatility, and ordering the retained points. Descending highs can define resistance, while ascending lows can define support; selected pairs are joined using their actual slope and extended forward as rays.

The tool is intended to make chart structure more consistent and easier to inspect than manually drawn lines or indicator-defined pivots. ATR filtering is described as an optional way to adapt swing thresholds to changing volatility, and the article discusses chart illustrations of the resulting structures. It frames the lines as analytical references for observing price interaction, not as forecasts or standalone trade signals. The excerpt provides no quantitative evidence that these structures predict profitable trades, and swing rules and thresholds remain implementation choices.

Key ideas

  • Detect swing highs and lows from raw price action rather than relying on indicator pivots.
  • Filter candidate swings by magnitude, optionally scaling the threshold with ATR.
  • Use descending highs for resistance lines and ascending lows for support lines.
  • Extend validated lines forward at the slope set by the selected swings.
  • Treat the resulting trendlines as structural references rather than trade predictions.

Tags

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