OPEN-SOURCE SCRIPT
Actualizado Smart Trap Structure

Smart Trap Structure (STS)
The Smart Trap Structure (STS) is an advanced institutional and structural trading indicator designed to filter out market noise, identify deep liquidity hunts (traps), and track the true directional intent of the market.
Unlike standard market structure scripts that clutter the chart with endless BOS (Break of Structure) and CHoCH (Change of Character) labels, STS utilizes an exclusive "Active Setup Cycle" logic. This ensures that you only see the most relevant price ranges and confirmation points for the current market phase.

Key Features:
The Decision Line (Orange Retest Line):
Whenever a valid CHoCH occurs, an active orange "Decision Line" is projected forward. This line acts as the ultimate truth for the setup. If price violently pierces this line, it is often hunting for stop-losses (Smart Money Trap) before continuing in the intended direction.
Reaction Zones (HH & LL Boxes):
Instead of just drawing wicks, STS dynamically maps the extreme Highest Highs (HH) and Lowest Lows (LL) of a confirmed structural phase using shaded Reaction Zone boxes (from the absolute wick to the body). These zones act as highly reactive supply and demand areas for future retests.
Dynamic Fibonacci Engine:
STS features a built-in Fibonacci drawing tool that automatically anchors to the confirmed extremes (HH to LL or LL to HH) of the active setup phase. It perfectly projects structural retracement and extension levels (0, 0.236, 0.382, 0.618, 0.764, 1.0, 1.382, 1.618). When Fibo mode is active, it automatically hides unnecessary historical dotted lines for maximum chart clarity.
Clean Chart Mechanics:
You will never suffer from "indicator fatigue". When the structure shifts, the indicator forcefully deletes old, irrelevant lines, reaction boxes, and labels from past cycles. Only the active CHoCH label remains standard-sized, while internal BOS events are scaled down to keep your chart visually clean.
Integrated MA & VWAP:
Toggle the built-in VWAP and select from a variety of Moving Averages (SMA, EMA, WMA, HMA, VWMA) straight from the settings without needing an extra indicator slot on your chart.
Disclaimer:
This script is provided for educational and analytical purposes only. Past performance does not guarantee future results. The script does not constitute financial advice. Always use proper risk management and execute trades based on your own comprehensive market analysis.
The Smart Trap Structure (STS) is an advanced institutional and structural trading indicator designed to filter out market noise, identify deep liquidity hunts (traps), and track the true directional intent of the market.
Unlike standard market structure scripts that clutter the chart with endless BOS (Break of Structure) and CHoCH (Change of Character) labels, STS utilizes an exclusive "Active Setup Cycle" logic. This ensures that you only see the most relevant price ranges and confirmation points for the current market phase.
Key Features:
The Decision Line (Orange Retest Line):
Whenever a valid CHoCH occurs, an active orange "Decision Line" is projected forward. This line acts as the ultimate truth for the setup. If price violently pierces this line, it is often hunting for stop-losses (Smart Money Trap) before continuing in the intended direction.
Reaction Zones (HH & LL Boxes):
Instead of just drawing wicks, STS dynamically maps the extreme Highest Highs (HH) and Lowest Lows (LL) of a confirmed structural phase using shaded Reaction Zone boxes (from the absolute wick to the body). These zones act as highly reactive supply and demand areas for future retests.
Dynamic Fibonacci Engine:
STS features a built-in Fibonacci drawing tool that automatically anchors to the confirmed extremes (HH to LL or LL to HH) of the active setup phase. It perfectly projects structural retracement and extension levels (0, 0.236, 0.382, 0.618, 0.764, 1.0, 1.382, 1.618). When Fibo mode is active, it automatically hides unnecessary historical dotted lines for maximum chart clarity.
Clean Chart Mechanics:
You will never suffer from "indicator fatigue". When the structure shifts, the indicator forcefully deletes old, irrelevant lines, reaction boxes, and labels from past cycles. Only the active CHoCH label remains standard-sized, while internal BOS events are scaled down to keep your chart visually clean.
Integrated MA & VWAP:
Toggle the built-in VWAP and select from a variety of Moving Averages (SMA, EMA, WMA, HMA, VWMA) straight from the settings without needing an extra indicator slot on your chart.
Disclaimer:
This script is provided for educational and analytical purposes only. Past performance does not guarantee future results. The script does not constitute financial advice. Always use proper risk management and execute trades based on your own comprehensive market analysis.
Notas de prensa
Sweep Wick Return ZonesWhenever the market structure shifts and prints a Change of Character (CHoCH), the indicator identifies the specific breakout candle responsible for the structural shift. The Sweep Wick Return engine automatically isolates the wick of this pivotal candle:
For Bullish Reversals: It highlights the lower wick (the zone between the candle's low and its lowest body level) and projects it forward as a bullish support zone.
For Bearish Reversals: It highlights the upper wick (the zone between the candle's high and its highest body level) and projects it forward as a bearish resistance zone.
How to use it: This engine is designed around the concept of liquidity sweeps and mitigation. After a strong structural break, price often "returns" to the wick of the breakout candle to rebalance trapped orders or sweep resting liquidity before continuing in the new trend direction. These dynamically drawn boxes serve as high-probability Points of Interest (POIs) for entry or re-accumulation. The zone automatically hides when a new opposite setup forms, keeping your chart clean and relevant.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.