Algo Market Structure

Algo Market Structure plots the structure points of the market (swing highs and swing lows) with one strict rule: a high or a low only becomes a structure point when price breaks the structure. Extremes that stay inside the current range are never marked, so the chart only shows the points that matter to read the trend.
WHAT MAKES IT DIFFERENT
Classic swing tools (pivot highs and lows, ZigZag) depend on a length or a percentage setting, and they mark swings even when they stay inside the range. This script has no length setting: a point only exists once the structure breaks, and every point must be confirmed by a candle of the opposite colour.
HOW IT WORKS
• When price breaks the last structure high, the lowest point of the pullback before that break becomes the new structure low. When price breaks the last structure low, the highest point of the pullback becomes the new structure high.
• Every point must be validated by a candle of the opposite colour: a bearish candle after a high, a bullish candle after a low. A neutral doji takes the colour of the previous candle.
• An equal high (or equal low) also breaks the structure, but only when the point between the two levels is a real, validated point. Two candles side by side with the same high are treated as one single top.
• Structure exceptions (on by default): a point that is not the true extreme between its two neighbours is moved onto that extreme (exception 1). When no candle can validate a point, that point and the one before it are removed (exception 2).
LIMITATIONS: WHEN THE POINTS APPEAR
The structure is updated at each new candle, from closed candles. A point is only confirmed after the break, so it appears later than the candle it marks: it is drawn back on the candle that made the high or the low. With "Fix structure exceptions" on, a point already on the chart can also be moved or removed when a later candle reveals an exception. Keep this in mind when you study past points: they were not all visible in real time when they formed.
SETTINGS
• Show Structure Points: shows or hides the points.
• Min: the lowest chart timeframe on which the points are displayed (empty = all timeframes).
• Top point / Bottom point: colours of the points.
• Point size / Point style: Circle (drawn exactly on the high or the low) or Text dot.
• Indicator Start Date: the structure is calculated from this date.
• Fix structure exceptions: applies the two exceptions above.
HOW TO USE IT
Read the trend with the points: higher highs and higher lows in an uptrend, lower lows and lower highs in a downtrend. A break of the last structure point is the first sign that the trend may change. The indicator gives no buy or sell signals: it is a reading tool for market structure, on any market and any timeframe.
The source code is open: you can read it to see exactly how each point is detected.
WHAT MAKES IT DIFFERENT
Classic swing tools (pivot highs and lows, ZigZag) depend on a length or a percentage setting, and they mark swings even when they stay inside the range. This script has no length setting: a point only exists once the structure breaks, and every point must be confirmed by a candle of the opposite colour.
HOW IT WORKS
• When price breaks the last structure high, the lowest point of the pullback before that break becomes the new structure low. When price breaks the last structure low, the highest point of the pullback becomes the new structure high.
• Every point must be validated by a candle of the opposite colour: a bearish candle after a high, a bullish candle after a low. A neutral doji takes the colour of the previous candle.
• An equal high (or equal low) also breaks the structure, but only when the point between the two levels is a real, validated point. Two candles side by side with the same high are treated as one single top.
• Structure exceptions (on by default): a point that is not the true extreme between its two neighbours is moved onto that extreme (exception 1). When no candle can validate a point, that point and the one before it are removed (exception 2).
LIMITATIONS: WHEN THE POINTS APPEAR
The structure is updated at each new candle, from closed candles. A point is only confirmed after the break, so it appears later than the candle it marks: it is drawn back on the candle that made the high or the low. With "Fix structure exceptions" on, a point already on the chart can also be moved or removed when a later candle reveals an exception. Keep this in mind when you study past points: they were not all visible in real time when they formed.
SETTINGS
• Show Structure Points: shows or hides the points.
• Min: the lowest chart timeframe on which the points are displayed (empty = all timeframes).
• Top point / Bottom point: colours of the points.
• Point size / Point style: Circle (drawn exactly on the high or the low) or Text dot.
• Indicator Start Date: the structure is calculated from this date.
• Fix structure exceptions: applies the two exceptions above.
HOW TO USE IT
Read the trend with the points: higher highs and higher lows in an uptrend, lower lows and lower highs in a downtrend. A break of the last structure point is the first sign that the trend may change. The indicator gives no buy or sell signals: it is a reading tool for market structure, on any market and any timeframe.
The source code is open: you can read it to see exactly how each point is detected.
Bob · AlgoTrade | Free course and indicators: algo-trade.fr | Telegram: t.me/+QaTFsc4KVjAxMDU0 | YouTube: youtube.com/@Algo_Trade-fr
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Bob · AlgoTrade | Free course and indicators: algo-trade.fr | Telegram: t.me/+QaTFsc4KVjAxMDU0 | YouTube: youtube.com/@Algo_Trade-fr
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.