OPEN-SOURCE SCRIPT
ICT Anchored Market Structures with Validation [LuxAlgo]

The ICT Anchored Market Structures with Validation indicator is an advanced iteration of the original Pure-Price-Action-Structures tool, designed for price action traders.
It systematically tracks and validates key price action structures, distinguishing between true structural shifts/breaks and short-term sweeps to enhance trend and reversal analysis. The indicator automatically highlights structural points, confirms breakouts, identifies sweeps, and provides clear visual cues for short-term, intermediate-term, and long-term market structures.
A distinctive feature of this indicator is its exclusive reliance on price patterns. It does not depend on any user-defined input, ensuring that its analysis remains robust, objective, and uninfluenced by user bias, making it an effective tool for understanding market dynamics.
🔶 USAGE

Market structure is a cornerstone of price action analysis. This script automatically detects real-time market structures across short-term, intermediate-term, and long-term levels, simplifying trend analysis for traders. It assists in identifying both trend reversals and continuations with greater clarity.

Market structure shifts and breaks help traders identify changes in trend direction. A shift signals a potential reversal, often occurring when a swing high or low is breached, suggesting a transition in trend. A break, on the other hand, confirms the continuation of an established trend, reinforcing the current direction. Recognizing these shifts and breaks allows traders to anticipate price movement with greater accuracy.

It’s important to note that while a CHoCH may signal a potential trend reversal and a BoS suggests a continuation of the prevailing trend, neither guarantees a complete reversal or continuation. In some cases, CHoCH and BoS levels may act as liquidity zones or areas of consolidation rather than indicating a clear shift or continuation in market direction. The indicator’s validation component helps confirm whether the detected CHoCH and BoS are true breakouts or merely liquidity sweeps.

🔶 DETAILS
🔹 Market Structures
Market structures are derived from price action analysis, focusing on identifying key levels and patterns in the market. Swing point detection, a fundamental concept in ICT trading methodologies and teachings, plays a central role in this approach.

Swing points are automatically identified based exclusively on market movements, without requiring any user-defined input.
🔹 Utilizing Swing Points
Swing points are not identified in real-time as they form. Short-term swing points may appear with a delay of up to one bar, while the identification of intermediate and long-term swing points is entirely dependent on subsequent market movements. Importantly, this detection process is not influenced by any user-defined input, relying solely on pure price action. As a result, swing points are generally not intended for real-time trading scenarios.
Instead, traders often analyze historical swing points to understand market trends and identify potential entry and exit opportunities. By examining swing highs and lows, traders can:
Overall, swing points provide valuable information about market dynamics and can assist traders in making more informed trading decisions.
🔹 Logic of Validation
The validation process in this script determines whether a detected market structure shift or break represents a confirmed breakout or a sweep.
The breakout is confirmed when the close price is significantly outside the deviation range of the last detected structural price. This deviation range is defined by the 17-period Average True Range (ATR), which creates a buffer around the detected market structure shift or break.
A sweep occurs when the price breaches the structural level within the deviation range but does not confirm a breakout. In this case, the label is updated to 'SWEEP.'
A visual box is created to represent the price range where the breakout or sweep occurs. If the validation process continues, the box is updated. This box visually highlights the price range involved in a sweep, helping traders identify liquidity events on the chart.

🔶 SETTINGS
The settings for Short-Term, Intermediate-Term, and Long-Term Structures are organized into groups, allowing users to customize swing points, market structures, and visual styles for each.
🔹 Structures
🔶 RELATED SCRIPTS
It systematically tracks and validates key price action structures, distinguishing between true structural shifts/breaks and short-term sweeps to enhance trend and reversal analysis. The indicator automatically highlights structural points, confirms breakouts, identifies sweeps, and provides clear visual cues for short-term, intermediate-term, and long-term market structures.
A distinctive feature of this indicator is its exclusive reliance on price patterns. It does not depend on any user-defined input, ensuring that its analysis remains robust, objective, and uninfluenced by user bias, making it an effective tool for understanding market dynamics.
🔶 USAGE
Market structure is a cornerstone of price action analysis. This script automatically detects real-time market structures across short-term, intermediate-term, and long-term levels, simplifying trend analysis for traders. It assists in identifying both trend reversals and continuations with greater clarity.
Market structure shifts and breaks help traders identify changes in trend direction. A shift signals a potential reversal, often occurring when a swing high or low is breached, suggesting a transition in trend. A break, on the other hand, confirms the continuation of an established trend, reinforcing the current direction. Recognizing these shifts and breaks allows traders to anticipate price movement with greater accuracy.
It’s important to note that while a CHoCH may signal a potential trend reversal and a BoS suggests a continuation of the prevailing trend, neither guarantees a complete reversal or continuation. In some cases, CHoCH and BoS levels may act as liquidity zones or areas of consolidation rather than indicating a clear shift or continuation in market direction. The indicator’s validation component helps confirm whether the detected CHoCH and BoS are true breakouts or merely liquidity sweeps.
🔶 DETAILS
🔹 Market Structures
Market structures are derived from price action analysis, focusing on identifying key levels and patterns in the market. Swing point detection, a fundamental concept in ICT trading methodologies and teachings, plays a central role in this approach.
Swing points are automatically identified based exclusively on market movements, without requiring any user-defined input.
🔹 Utilizing Swing Points
Swing points are not identified in real-time as they form. Short-term swing points may appear with a delay of up to one bar, while the identification of intermediate and long-term swing points is entirely dependent on subsequent market movements. Importantly, this detection process is not influenced by any user-defined input, relying solely on pure price action. As a result, swing points are generally not intended for real-time trading scenarios.
Instead, traders often analyze historical swing points to understand market trends and identify potential entry and exit opportunities. By examining swing highs and lows, traders can:
- Recognize Trends: Swing highs and lows provide insight into trend direction. Higher swing highs and higher swing lows signify an uptrend, while lower swing highs and lower swing lows indicate a downtrend.
- Identify Support and Resistance Levels: Swing highs often act as resistance levels, referred to as Buyside Liquidity Levels in ICT terminology, while swing lows function as support levels, also known as Sellside Liquidity Levels. Traders can leverage these levels to plan their trade entries and exits.
- Spot Reversal Patterns: Swing points can form key reversal patterns, such as double tops or bottoms, head and shoulders, and triangles. Recognizing these patterns can indicate potential trend reversals, enabling traders to adjust their strategies effectively.
- Set Stop Loss and Take Profit Levels: In ICT teachings, swing levels represent price points with expected clusters of buy or sell orders. Traders can target these liquidity levels/pools for position accumulation or distribution, using swing points to define stop loss and take profit levels in their trades.
Overall, swing points provide valuable information about market dynamics and can assist traders in making more informed trading decisions.
🔹 Logic of Validation
The validation process in this script determines whether a detected market structure shift or break represents a confirmed breakout or a sweep.
The breakout is confirmed when the close price is significantly outside the deviation range of the last detected structural price. This deviation range is defined by the 17-period Average True Range (ATR), which creates a buffer around the detected market structure shift or break.
A sweep occurs when the price breaches the structural level within the deviation range but does not confirm a breakout. In this case, the label is updated to 'SWEEP.'
A visual box is created to represent the price range where the breakout or sweep occurs. If the validation process continues, the box is updated. This box visually highlights the price range involved in a sweep, helping traders identify liquidity events on the chart.
🔶 SETTINGS
The settings for Short-Term, Intermediate-Term, and Long-Term Structures are organized into groups, allowing users to customize swing points, market structures, and visual styles for each.
🔹 Structures
- Swings and Size: Enables or disables the display of swing highs and lows, assigns icons to represent the structures, and adjusts the size of the icons.
- Market Structures: Toggles the visibility of market structure lines.
- Market Structure Validation: Enable or disable validation to distinguish true breakouts from liquidity sweeps.
- Market Structure Labels: Displays or hides labels indicating the type of market structure.
- Line Style and Width: Allows customization of the style and width of the lines representing market structures.
- Swing and Line Colors: Provides options to adjust the colors of swing icons, market structure lines, and labels for better visualization.
🔶 RELATED SCRIPTS
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Get access to our exclusive tools: luxalgo.com
Join our 150k+ community: discord.gg/lux
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Join our 150k+ community: discord.gg/lux
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Get access to our exclusive tools: luxalgo.com
Join our 150k+ community: discord.gg/lux
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Join our 150k+ community: discord.gg/lux
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.