OPEN-SOURCE SCRIPT
Strat Structure Engine

Strat Structure Engine + Trapped Traders – TradingView Public Library Description (Moderator-Optimized)
Overview:
The Strat Structure Engine + Trapped Traders script is a self-contained price action indicator that identifies high-probability market structure patterns using The Strat methodology. It integrates bar-based structure, volatility (ATR), and volume analysis to detect potential reversals, exhaustion points, and trapped trader scenarios directly on the chart. Unlike generic indicators, it grades signals for reliability and visual clarity, providing actionable insight for traders.
Originality and Purpose:
This script is original because it combines multiple structure-based patterns into a single, coherent system:
3-Bar → Failed 2 (3→F2) – A tiered scoring system evaluates the strength of a strict 3-bar structure followed by a Failed 2 bar.
2-Bar → Failed 2 (2→F2, A+ only) – Filters only the strongest 2-bar setups followed by a Failed 2 for high-confidence reversal signals.
Failed 2 → Failed 2 (Dragon’s Tail / F2→F2) – Detects consecutive Failed 2 bars in opposite directions, signaling trapped traders and quick reversals.
Each pattern is evaluated using objective criteria: bar range relative to ATR, Failed 2 close relative to the preceding structure, body-to-range ratio, and volume spikes compared to recent averages. The combination of multiple patterns with tiered scoring and volume confirmation is unique and cannot be reproduced by simply merging standard indicators.
Signal Evaluation and Scoring:
1. 3→F2 (Tiered Scoring)
Criteria:
3-bar range vs ATR
Failed 2 close relative to 3-bar midpoint
Body-to-range ratio
Volume vs recent SMA
Tier Grades: A+, A, B, —
Purpose: Helps traders prioritize high-confidence reversal setups while filtering out weaker signals.
2. 2→F2 (A+ Only)
Evaluates strict 2-bar structures followed by a Failed 2 bar.
Displays only the strongest A+ setups to reduce noise.
3. F2→F2 (Dragon’s Tail)
Detects consecutive Failed 2 bars in opposite directions.
Highlights trapped trader zones and potential rapid reversals.
Volume and Volatility Integration:
ATR normalization ensures bar ranges are contextualized to market volatility.
SMA volume averaging confirms unusual activity, filtering signals with low participation.
This ensures signals are structurally valid and contextually significant.
Chart and Visual Clarity:
Labels are color-coded (green for bullish, red for bearish) and include tier/score for easy interpretation.
Only confirmed patterns are labeled, avoiding clutter or ambiguous markings.
Works on standard candlestick charts (does not use Heikin Ashi, Renko, or Range bars), ensuring realistic and reliable signals.
Customization and Alerts:
Toggle each pattern on/off: 3→F2, 2→F2, F2→F2
Adjust ATR length and volume average period per instrument or timeframe.
Alerts available for all patterns for bar-close confirmation, enabling real-time monitoring or integration with trading systems.
Practical Trading Use:
Identify exhaustion points, trapped traders, and reversals.
Can be used alongside VWAP, liquidity zones, fair value gaps, and session extremes for enhanced entry and exit decisions.
Focus on A+ / A tier signals for execution; use B-tier signals for context or partial entries.
Designed for multiple instruments (equities, futures, Forex) and adaptable across timeframes.
Compliance and Risk Notes:
Signals are historical, not predictive.
Follow proper risk management and do not rely solely on indicator signals.
Past performance does not guarantee future results.
Does not use request.security() with lookahead; all signals are confirmed on bar close.
✅ Key Advantages:
Fully self-contained, original methodology.
Multi-pattern integration with tiered scoring for reliability.
Volume and ATR confirmation reduces noise and false signals.
Clean, uncluttered chart output that is easy to read and interpret.
This version explicitly addresses moderation points:
Originality: explains why the mashup is necessary and unique.
Usefulness: shows exactly how traders can use it.
Chart clarity: confirms labels are meaningful, non-redundant, and easy to read.
Signal realism: bars are confirmed, no lookahead used.
Overview:
The Strat Structure Engine + Trapped Traders script is a self-contained price action indicator that identifies high-probability market structure patterns using The Strat methodology. It integrates bar-based structure, volatility (ATR), and volume analysis to detect potential reversals, exhaustion points, and trapped trader scenarios directly on the chart. Unlike generic indicators, it grades signals for reliability and visual clarity, providing actionable insight for traders.
Originality and Purpose:
This script is original because it combines multiple structure-based patterns into a single, coherent system:
3-Bar → Failed 2 (3→F2) – A tiered scoring system evaluates the strength of a strict 3-bar structure followed by a Failed 2 bar.
2-Bar → Failed 2 (2→F2, A+ only) – Filters only the strongest 2-bar setups followed by a Failed 2 for high-confidence reversal signals.
Failed 2 → Failed 2 (Dragon’s Tail / F2→F2) – Detects consecutive Failed 2 bars in opposite directions, signaling trapped traders and quick reversals.
Each pattern is evaluated using objective criteria: bar range relative to ATR, Failed 2 close relative to the preceding structure, body-to-range ratio, and volume spikes compared to recent averages. The combination of multiple patterns with tiered scoring and volume confirmation is unique and cannot be reproduced by simply merging standard indicators.
Signal Evaluation and Scoring:
1. 3→F2 (Tiered Scoring)
Criteria:
3-bar range vs ATR
Failed 2 close relative to 3-bar midpoint
Body-to-range ratio
Volume vs recent SMA
Tier Grades: A+, A, B, —
Purpose: Helps traders prioritize high-confidence reversal setups while filtering out weaker signals.
2. 2→F2 (A+ Only)
Evaluates strict 2-bar structures followed by a Failed 2 bar.
Displays only the strongest A+ setups to reduce noise.
3. F2→F2 (Dragon’s Tail)
Detects consecutive Failed 2 bars in opposite directions.
Highlights trapped trader zones and potential rapid reversals.
Volume and Volatility Integration:
ATR normalization ensures bar ranges are contextualized to market volatility.
SMA volume averaging confirms unusual activity, filtering signals with low participation.
This ensures signals are structurally valid and contextually significant.
Chart and Visual Clarity:
Labels are color-coded (green for bullish, red for bearish) and include tier/score for easy interpretation.
Only confirmed patterns are labeled, avoiding clutter or ambiguous markings.
Works on standard candlestick charts (does not use Heikin Ashi, Renko, or Range bars), ensuring realistic and reliable signals.
Customization and Alerts:
Toggle each pattern on/off: 3→F2, 2→F2, F2→F2
Adjust ATR length and volume average period per instrument or timeframe.
Alerts available for all patterns for bar-close confirmation, enabling real-time monitoring or integration with trading systems.
Practical Trading Use:
Identify exhaustion points, trapped traders, and reversals.
Can be used alongside VWAP, liquidity zones, fair value gaps, and session extremes for enhanced entry and exit decisions.
Focus on A+ / A tier signals for execution; use B-tier signals for context or partial entries.
Designed for multiple instruments (equities, futures, Forex) and adaptable across timeframes.
Compliance and Risk Notes:
Signals are historical, not predictive.
Follow proper risk management and do not rely solely on indicator signals.
Past performance does not guarantee future results.
Does not use request.security() with lookahead; all signals are confirmed on bar close.
✅ Key Advantages:
Fully self-contained, original methodology.
Multi-pattern integration with tiered scoring for reliability.
Volume and ATR confirmation reduces noise and false signals.
Clean, uncluttered chart output that is easy to read and interpret.
This version explicitly addresses moderation points:
Originality: explains why the mashup is necessary and unique.
Usefulness: shows exactly how traders can use it.
Chart clarity: confirms labels are meaningful, non-redundant, and easy to read.
Signal realism: bars are confirmed, no lookahead used.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.