OPEN-SOURCE SCRIPT
Aggiornato

EdgeXplorer // Swing Sequence

228
EdgeXplorer - Swing Sequence

Swing Sequence is an advanced structural mapping indicator designed to detect and visualize internal swing formations, sequence logic, and multi-leg transitions directly on the chart. This tool is particularly useful for traders applying Smart Money Concepts (SMC), Wyckoff theory, or Elliott-style structure recognition, where the accuracy of pivot timing, internal leg evaluation, and pattern tracking is mission-critical.

Instead of drawing arbitrary zig-zags, this indicator uses real market structure to extract and label potential bullish or bearish reversal sequences, including optional point 5 confirmations and internal double-top/double-bottom logic — all in real time.



🔍 What Does Swing Sequence Do?

Swing Sequence dynamically identifies structured pivot points and evaluates swing sequences composed of up to 6 labeled legs (A, B, 1, 2, 3, 4) and an optional 5th confirmation point. Once a valid bullish or bearish pattern is recognized based on defined structural rules, it plots:
• Pivot labels (A through 5)
• Swing zones or boxes outlining the full formation
• Optional pathlines to visualize swing flow
• Dotted projection lines for context

It also uses internal logic to detect double-point confirmations, creating a highly structured, rule-based method for visualizing potential reversals or continuations.


istantanea


⚙️ How It Works – Technical Breakdown
1. Pivot Detection
The script calculates two sets of pivots:
• External Swings using Swing Pivot Length (len)
• Internal Swings using Internal Pivot Length (ilen)
Both use high/low extremities to determine directional bias (BULL or BEAR).
2. Sequence Evaluation
Once enough pivots are collected (at least six), the algorithm attempts to construct valid sequences:
• Bullish: A → B → 1 → 2 → 3 → 4 (+ optional 5)
• Bearish: A → B → 1 → 2 → 3 → 4 (+ optional 5)
Each candidate is evaluated using logical price containment, directional flow, and a unique “point 4 beyond point 2” condition (optional).
3. Double Point Logic
If enabled, the indicator looks for a second internal pivot that aligns in price proximity with point 4 (adjustable via Strict Double-Top/Bottom and ATR-based Threshold), allowing traders to require confirmation before considering a sequence valid.
4. Sequence Validation
Sequences are only plotted if:
• All structural rules are met
• There’s no overlap with a previously plotted sequence
• Optional filters (like show/hide point 5) are satisfied


istantanea


📈 What You See on the Chart

Visual Purpose
Labels A–5 Marks each structural point in the sequence. Label 5 is optional.
Colored Box Encapsulates the swing structure:
 • Green Box → Bullish sequence
 • Red Box → Bearish sequence
Dotted Lines Horizontal projection from each swing point to end of sequence
Polyline (Path) (Optional) Connects all swing points to show flow
Auto-Coloring Box and line colors change based on bullish or bearish pattern, unless overridden




📊 Inputs & Settings Explained

Detection Settings

Input Description
Swing Pivot Length (len) Controls the lookback for external high/low pivots. Larger values = broader swings
Internal Pivot Length (ilen) Controls lookback for internal swing structure — used for validation and double-point logic
4 Beyond 2 Forces point 4 to go beyond point 2 for sequence to be valid
Show Point 5 Toggles whether point 5 is included in plotted sequences
Strict Double-Top/Bottom Enables stricter proximity matching between internal pivots (uses absolute levels vs. price containment)
Threshold Sets sensitivity of double-point matching, scaled by ATR(200) for dynamic precision

Display Settings

Input Description
Path Plots a polyline that connects all labeled points in a sequence
Boxes Toggles the shaded swing box zone
Line Color Default color for path and projection lines when auto-coloring is disabled
Auto-Color Automatically changes box and label colors based on trend direction
Show Lines Toggles horizontal dotted projection lines from each swing point




🧠 How to Read & Use Swing Sequence

Swing Sequence is a visual structural analyzer, not a signal tool. Here’s how to interpret what you see:

Bullish Sequence Example

  A (high)
  ↓
  B (low)
  ↓
  1 → 2 → 3 → 4 (lower highs/lows)
  ↓
  5 (double bottom)

Interpretation: Price is forming a potential reversal base. Confirmation at point 5 adds confluence for long setups.

Bearish Sequence Example

  A (low)
  ↑
  B (high)
  ↑
  1 → 2 → 3 → 4 (higher highs/lows)
  ↑
  5 (double top)

Interpretation: Market may be topping out. Point 5 adds structural symmetry and possible short confluence.

istantanea



🧪 Use Cases & Strategy Integration
• 🔍 Smart Money Traders: Use the sequences to identify where price is structurally exhausting liquidity or forming distribution/accumulation
• 🔄 Reversal Traders: Use point 5 or sequence completion as part of your entry filter
• 🎯 Structure-Based Confirmation: Use Swing Sequence to validate bias after FVG, OB, or BOS breaks
• 📏 Target Zones: Swing boxes can define range-based targets, stop zones, or breaker levels
Note di rilascio
EdgeXplorer - Swing Sequence

Swing Sequence is an advanced structural mapping indicator designed to detect and visualize internal swing formations, sequence logic, and multi-leg transitions directly on the chart. This tool is particularly useful for traders applying Smart Money Concepts (SMC), Wyckoff theory, or Elliott-style structure recognition, where the accuracy of pivot timing, internal leg evaluation, and pattern tracking is mission-critical.

Instead of drawing arbitrary zig-zags, this indicator uses real market structure to extract and label potential bullish or bearish reversal sequences, including optional point 5 confirmations and internal double-top/double-bottom logic — all in real time.



🔍 What Does Swing Sequence Do?

Swing Sequence dynamically identifies structured pivot points and evaluates swing sequences composed of up to 6 labeled legs (A, B, 1, 2, 3, 4) and an optional 5th confirmation point. Once a valid bullish or bearish pattern is recognized based on defined structural rules, it plots:
• Pivot labels (A through 5)
• Swing zones or boxes outlining the full formation
• Optional pathlines to visualize swing flow
• Dotted projection lines for context

It also uses internal logic to detect double-point confirmations, creating a highly structured, rule-based method for visualizing potential reversals or continuations.


istantanea




⚙️ How It Works – Technical Breakdown
1. Pivot Detection
The script calculates two sets of pivots:
• External Swings using Swing Pivot Length (len)
• Internal Swings using Internal Pivot Length (ilen)
Both use high/low extremities to determine directional bias (BULL or BEAR).
2. Sequence Evaluation
Once enough pivots are collected (at least six), the algorithm attempts to construct valid sequences:
• Bullish: A → B → 1 → 2 → 3 → 4 (+ optional 5)
• Bearish: A → B → 1 → 2 → 3 → 4 (+ optional 5)
Each candidate is evaluated using logical price containment, directional flow, and a unique “point 4 beyond point 2” condition (optional).
3. Double Point Logic
If enabled, the indicator looks for a second internal pivot that aligns in price proximity with point 4 (adjustable via Strict Double-Top/Bottom and ATR-based Threshold), allowing traders to require confirmation before considering a sequence valid.
4. Sequence Validation
Sequences are only plotted if:
• All structural rules are met
• There’s no overlap with a previously plotted sequence
• Optional filters (like show/hide point 5) are satisfied





📈 What You See on the Chart

Visual Purpose
Labels A–5 Marks each structural point in the sequence. Label 5 is optional.
Colored Box Encapsulates the swing structure:
 • Green Box → Bullish sequence
 • Red Box → Bearish sequence
Dotted Lines Horizontal projection from each swing point to end of sequence
Polyline (Path) (Optional) Connects all swing points to show flow
Auto-Coloring Box and line colors change based on bullish or bearish pattern, unless overridden




📊 Inputs & Settings Explained

Detection Settings

Input Description
Swing Pivot Length (len) Controls the lookback for external high/low pivots. Larger values = broader swings
Internal Pivot Length (ilen) Controls lookback for internal swing structure — used for validation and double-point logic
4 Beyond 2 Forces point 4 to go beyond point 2 for sequence to be valid
Show Point 5 Toggles whether point 5 is included in plotted sequences
Strict Double-Top/Bottom Enables stricter proximity matching between internal pivots (uses absolute levels vs. price containment)
Threshold Sets sensitivity of double-point matching, scaled by ATR(200) for dynamic precision

Display Settings

Input Description
Path Plots a polyline that connects all labeled points in a sequence
Boxes Toggles the shaded swing box zone
Line Color Default color for path and projection lines when auto-coloring is disabled
Auto-Color Automatically changes box and label colors based on trend direction
Show Lines Toggles horizontal dotted projection lines from each swing point




istantanea


🧠 How to Read & Use Swing Sequence

Swing Sequence is a visual structural analyzer, not a signal tool. Here’s how to interpret what you see:

Bullish Sequence Example

  A (high)
  ↓
  B (low)
  ↓
  1 → 2 → 3 → 4 (lower highs/lows)
  ↓
  5 (double bottom)

Interpretation: Price is forming a potential reversal base. Confirmation at point 5 adds confluence for long setups.

Bearish Sequence Example

  A (low)
  ↑
  B (high)
  ↑
  1 → 2 → 3 → 4 (higher highs/lows)
  ↑
  5 (double top)

Interpretation: Market may be topping out. Point 5 adds structural symmetry and possible short confluence.



🧪 Use Cases & Strategy Integration
• 🔍 Smart Money Traders: Use the sequences to identify where price is structurally exhausting liquidity or forming distribution/accumulation
• 🔄 Reversal Traders: Use point 5 or sequence completion as part of your entry filter
• 🎯 Structure-Based Confirmation: Use Swing Sequence to validate bias after FVG, OB, or BOS breaks
• 📏 Target Zones: Swing boxes can define range-based targets, stop zones, or breaker levels

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.