OPEN-SOURCE SCRIPT
Updated Structure Lite - Automatic Major Trend Lines

Structure Lite – Pivot-Based Market Structure Visualization
OVERVIEW
Structure Lite is an open-source charting tool designed to assist traders in visualizing higher-timeframe market structure. The script identifies major swing points using high-period pivot analysis and projects structural support and resistance lines directly on the chart. Its purpose is to highlight persistent market structure while minimizing visual noise.
CORE CONCEPTS & CALCULATIONS
Pivot Identification
The script uses Pine Script’s built-in ta.pivothigh() and ta.pivotlow() functions to identify confirmed swing highs and lows. A pivot is only validated after a user-defined number of bars (Major Pivot Lookback) have formed on both sides of the price extreme, ensuring that only structurally significant pivots are selected.
Structural Pairing
Each structural line is created only after two consecutive pivots of the same type are confirmed (high-to-high or low-to-low). The script stores the price and bar index of these pivots and uses them as fixed anchor points.
Line Projection
Once a valid pivot pair is formed, the script draws a line between the two points using line.new() and extends it forward using extend.right. These lines represent projected structural boundaries rather than trade signals.
Object Management
To maintain chart clarity and performance, the script manages all drawn objects through a line[] array. A FIFO (First-In, First-Out) method is applied so that only the three most recent structural lines remain visible. Older lines are automatically deleted as new ones are created.
DESIGN PHILOSOPHY & ORIGINALITY
While many indicators plot frequent swing points or short-term pivots, Structure Lite focuses on structural persistence. By filtering for higher-period pivots and limiting the number of displayed projections, the script emphasizes dominant market structure rather than short-term fluctuations. This approach is intended to support discretionary analysis, not replace it.
HOW TO USE
Major Pivot Lookback
Increase the value to focus on higher-timeframe structure (e.g., swing or position trading).
Decrease the value to visualize intraday structural levels.
Visual Encoding
Green lines represent projected structural support
Red lines represent projected structural resistance
Visibility Control
A boolean input allows all structure lines to be hidden instantly to restore a clean price chart.
LIMITATIONS & DISCLAIMER
This script is a visualization tool only. It does not generate trade signals, entry or exit points, alerts, or directional forecasts. All plotted levels are derived from historical price action and may change as new pivots form. The script is provided for educational and analytical purposes and should be used in conjunction with other forms of market analysis
OVERVIEW
Structure Lite is an open-source charting tool designed to assist traders in visualizing higher-timeframe market structure. The script identifies major swing points using high-period pivot analysis and projects structural support and resistance lines directly on the chart. Its purpose is to highlight persistent market structure while minimizing visual noise.
CORE CONCEPTS & CALCULATIONS
Pivot Identification
The script uses Pine Script’s built-in ta.pivothigh() and ta.pivotlow() functions to identify confirmed swing highs and lows. A pivot is only validated after a user-defined number of bars (Major Pivot Lookback) have formed on both sides of the price extreme, ensuring that only structurally significant pivots are selected.
Structural Pairing
Each structural line is created only after two consecutive pivots of the same type are confirmed (high-to-high or low-to-low). The script stores the price and bar index of these pivots and uses them as fixed anchor points.
Line Projection
Once a valid pivot pair is formed, the script draws a line between the two points using line.new() and extends it forward using extend.right. These lines represent projected structural boundaries rather than trade signals.
Object Management
To maintain chart clarity and performance, the script manages all drawn objects through a line[] array. A FIFO (First-In, First-Out) method is applied so that only the three most recent structural lines remain visible. Older lines are automatically deleted as new ones are created.
DESIGN PHILOSOPHY & ORIGINALITY
While many indicators plot frequent swing points or short-term pivots, Structure Lite focuses on structural persistence. By filtering for higher-period pivots and limiting the number of displayed projections, the script emphasizes dominant market structure rather than short-term fluctuations. This approach is intended to support discretionary analysis, not replace it.
HOW TO USE
Major Pivot Lookback
Increase the value to focus on higher-timeframe structure (e.g., swing or position trading).
Decrease the value to visualize intraday structural levels.
Visual Encoding
Green lines represent projected structural support
Red lines represent projected structural resistance
Visibility Control
A boolean input allows all structure lines to be hidden instantly to restore a clean price chart.
LIMITATIONS & DISCLAIMER
This script is a visualization tool only. It does not generate trade signals, entry or exit points, alerts, or directional forecasts. All plotted levels are derived from historical price action and may change as new pivots form. The script is provided for educational and analytical purposes and should be used in conjunction with other forms of market analysis
Release Notes
How To: Trading Market Structure with Structure LiteWhile the script identifies levels, the "Edge" comes from how you interpret the price's reaction to these zones. Here are the three primary playbooks for using this tool:
1. The Liquidity Void Seal (Mean Reversion)
What it is: When price aggressively moves away from a Green (Support) or Red (Resistance) zone, it creates a "Structural Gap."
The Trade: Look for price to return to the last "Projected Line."
Execution: A successful 'repair' occurs when price touches the line and prints a reversal candle (Pin Bar/Engulfing). This suggests the imbalance is filled and the original move can resume.
2. Structural Pairing Breakouts (Trend Expansion)
What it is: The script draws a line after two matching pivots are confirmed.
The Trade: If price breaks and closes above a Red Structural Resistance line on high volume, the previous "ceiling" has failed.
Execution: Treat the broken Red line as the new "Floor." Traders often look for a retest of this line to enter in the direction of the breakout.
3. Pivot-Based Risk Management
What it is: Using the script’s Major Pivot Lookback to define "Invalidation Points."
The Trade: For a Long position, your stop-loss should logically sit below the most recent Green Structural Support line.
Execution: If price closes below the Green line, the "Higher-Timeframe Structure" has officially shifted. This provides a non-arbitrary reason to exit a trade, preserving capital for the next structural alignment.
Release Notes
v1.2 Release: Smart Money Structure UpdateWhat’s New?
Institutional Volume Filtering: The script now calculates a relative volume moving average. It will only signal a Break of Structure (BOS) if price breaks a level with significantly higher-than-average volume, suggesting institutional participation.
Automated BOS Labels: Visual labels now appear instantly when a major pivot level is breached with high conviction.
Real-time Alerts: Integrated alertcondition for both Bullish and Bearish BOS, allowing you to track major structural shifts across multiple timeframes without staring at the screen.
Optimization: Refined array management to ensure the script remains lightweight and fast, even on lower-end devices.
How to Trade it
Identify the Trend: Let the green/red lines show you the major macro boundaries.
Wait for the Signal: Look for the BOS label. This isn't just a price cross; it’s a volume-backed breakout.
Confirm: Use the BOS as a signal that the current trend is accelerating or a reversal has structural backing.
Release Notes
Technical Clarification: Strategic Uniqueness For those asking how this differs from standard SMC tools: Structure Lite is specifically engineered to bridge the gap between Diagonal Pivot Persistence and Horizontal BOS.Unlike generic scripts that signal every price cross, this tool requires Institutional Volume Validation (via the relative volume filter) before a structural break is confirmed. This ensures that the structure you see isn't just retail noise, but high-conviction market shifts.
Release Notes
NORMALIZED RSI OVERLAY The core of Structure Lite v2.0 is the integration of the Normalized RSI—a professional-grade momentum line plotted directly on your price action. By scaling momentum to price, we eliminate the need for cluttered sub-panes and put the "fuel gauge" exactly where you're trading.
Zero-Lag Confluence: Standard RSI lives in a vacuum at the bottom of your screen. This normalized version lives on your candles, allowing you to see exactly how momentum is "hooking" or "diving" relative to your Trend Lines and BoS labels in real-time.
The Leading Edge: Momentum typically shifts before price. Because this RSI is anchored to your price scale, you can spot diagonal momentum breaks 1–3 bars before the actual price structure breaks. This is your early-warning system for high-probability entries.
Instant Divergence Mapping: The white line makes Divergence (price making a new high while momentum makes a lower high) impossible to miss. If the white line isn't following the price into a BoS, you are likely looking at a bull or bear trap.
Dynamic Scaling: The math automatically adjusts to the asset you're trading—whether it’s
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
🔥 Trending
➜ Structure Lite: tradingview.com/script/ETN2PyhG/
💎 PRO ICT SUITE
➜ Pro: gammabull.gumroad.com/l/nlebrh
➜ VAULT-All Products (Free 7 Day Trial) gammabull.gumroad.com/l/rytfvb
Code PACK10=10% off all products
➜ Structure Lite: tradingview.com/script/ETN2PyhG/
💎 PRO ICT SUITE
➜ Pro: gammabull.gumroad.com/l/nlebrh
➜ VAULT-All Products (Free 7 Day Trial) gammabull.gumroad.com/l/rytfvb
Code PACK10=10% off all products
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
🔥 Trending
➜ Structure Lite: tradingview.com/script/ETN2PyhG/
💎 PRO ICT SUITE
➜ Pro: gammabull.gumroad.com/l/nlebrh
➜ VAULT-All Products (Free 7 Day Trial) gammabull.gumroad.com/l/rytfvb
Code PACK10=10% off all products
➜ Structure Lite: tradingview.com/script/ETN2PyhG/
💎 PRO ICT SUITE
➜ Pro: gammabull.gumroad.com/l/nlebrh
➜ VAULT-All Products (Free 7 Day Trial) gammabull.gumroad.com/l/rytfvb
Code PACK10=10% off all products
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.