Structural Sequence Pressure [JOAT]Structural Sequence Pressure
Introduction
Structural Sequence Pressure is a market-structure breakout indicator built around the idea that not all pivot levels carry the same weight. A level formed after one isolated pivot is ordinary. A level formed after repeated higher lows or lower highs represents structural persistence. This script quantifies that persistence, plots the resulting support and resistance levels, and highlights when those levels break.
The indicator is designed for traders who want clean structure without overfitting. It tracks sequence depth, manages active levels, and focuses attention on breaks that matter more because the market spent time constructing them.
Why This Indicator Exists
Sequence-Based Structure: Measures how many pivots formed in the same directional progression
Level Significance Filter: Helps distinguish weak levels from structurally reinforced ones
Live Break Detection: Signals when meaningful support or resistance gives way
Clutter Control: Caps active lines and labels to keep charts readable
Statistical Feedback: Shows the most recent sequence pressure behavior directly in the dashboard
Core Components Explained
1. Confirmed Pivot Detection
pivHigh = ta.pivothigh(high, leftBars, rightBars)
pivLow = ta.pivotlow(low, leftBars, rightBars)
The script only reacts to confirmed pivots. This means levels are built from validated swing points rather than from intrabar noise, which keeps the tool stable and non-repainting after pivot confirmation.
2. Upward and Downward Sequence Counting
When a new pivot low forms higher than the previous pivot low, the upward sequence count increases. When a new pivot high forms lower than the previous pivot high, the downward sequence count increases. If the relationship fails, the sequence resets to one.
Higher lows: Build upward structural pressure
Lower highs: Build downward structural pressure
Longer sequences: Represent stronger structural continuity
3. Active Level Engine
Every confirmed pivot creates a horizontal level that extends right. Support levels come from pivot lows. Resistance levels come from pivot highs. Each level stores:
Its price
Whether it is support or resistance
Its sequence depth
Its creation time
Levels are trimmed by age and capped by quantity so the chart stays clean.
4. Break Logic
brokeSupport = close < supportLevel
brokeResistance = close > resistanceLevel
Only levels with sequence depth greater than or equal to the selected threshold can trigger signals. This creates a cleaner breakout map that emphasizes structurally meaningful failures and expansions.
5. Chart Hygiene Controls
The script stores and prunes pivot labels so they do not accumulate indefinitely. Broken or expired levels are removed from active management, and broken levels can optionally be deleted immediately for a cleaner chart.
Visual Elements
Support Lines: Teal dashed levels extending from higher-low pivots
Resistance Lines: Red dashed levels extending from lower-high pivots
Pivot Labels: Compact U/D sequence tags showing progression depth
Break Markers: Triangles on bullish resistance breaks and bearish support breaks
Dashboard: Up sequence, down sequence, total breaks, last break depths, and active level count
Input Parameters
Pivot Left / Right Bars: Confirmation strength for structural swings
Minimum Sequence: Required sequence depth before a break can trigger
Max Active Levels: Hard cap for line management and chart cleanliness
Max Level Age: Removes stale structure from consideration
Delete Broken Levels: Optional cleanup for a more minimal chart
How to Use This Indicator
Step 1: Identify whether the market is building higher lows or lower highs.
Step 2: Focus on levels with deeper sequence counts.
Step 3: Treat bullish signals as upside breaks of resistance sequences.
Step 4: Treat bearish signals as downside breaks of support sequences.
Step 5: Use the level count and recent break depths to judge whether structure is compressing or resolving.
Best Practices
Use larger pivot settings on volatile instruments to reduce noise
Increase minimum sequence length when markets are choppy
Pair with trend or participation tools to separate continuation from exhaustion
Respect old levels less than fresh ones unless they were built with deep sequence pressure
Use the dashboard to calibrate structure sensitivity instrument by instrument
Indicator Limitations
Pivot-based tools confirm after the fact by design
Sequence strength measures persistence, not certainty
Very low pivot settings can create too many structural levels
Very high pivot settings can delay signals
Breakouts can still fail, especially in range-bound conditions
Technical Implementation
Built in Pine Script v6 using:
Confirmed pivot detection
Directional sequence counting
Array-managed line storage
Label retention caps for chart cleanliness
Age-based level cleanup
Non-repainting break logic on confirmed bars
Originality Statement
This indicator is original in its focus on sequence depth as the source of structural weighting. Many support and resistance tools draw levels; this one grades their importance by the persistence of the swing process that created them, then filters breakout logic through that structural pressure.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Structural breaks can fail, reverse, or whipsaw. Always use independent analysis, stops, and appropriate risk management.
-Made with passion by officialjackofalltrades
Indicateur Pine Script®






















