OPEN-SOURCE SCRIPT
Prime Strategy Swing

Market Structure (BOS/CHoCH)
Automatically detects Break of Structure and Change of Character on a configurable higher timeframe, plotting labeled structure lines so you always know the current trend bias.
Swing Highs/Lows
Marks HH/LH/LL/HL swing points on a separate configurable timeframe, giving a clean read of higher-timeframe price action independent of your chart's timeframe.
Liquidity Pools
Tracks the last 5 unmitigated swing highs and lows as extending liquidity lines, automatically removing them once price sweeps through.
Order Blocks
Auto-detects bullish and bearish order blocks following a break of structure, with automatic mitigation (deletion) once price returns to tap them.
Premium/Discount Zones with Fibonacci Levels
Draws a dynamic zone from the latest swing structure with 15%/30%/50%/70%/85% fib levels, shading the "premium" (sell) and "discount" (buy) halves so you can visually gauge where price sits in the current range.
Nadaraya-Watson Envelope Filter
An optional smoothed regression filter (Gaussian-weighted) used to confirm entries are occurring at statistical extremes, not just at fib levels.
200 EMA (slope-colored)
A 200-period EMA (length adjustable) that changes color based on its own slope — teal when rising, red when falling — for an instant trend-bias read.
Auto Signals
Optional BUY/BUY PRIME and SELL/SELL PRIME labels that trigger when price taps the 70%/85% zones during a configurable session window (default NY session), with a daily signal cap to avoid overtrading. Alerts included.
Live Dashboard
Top-right panel showing current structure trend, last CHoCH direction, current zone status, and NW filter state at a glance.
Volume Profile (optional)
Builds a volume profile across the most recent swing range with POC (Point of Control) highlighted.
⚠️ This is a discretionary confluence tool, not a standalone signal system — always confirm with your own analysis and risk management.
Automatically detects Break of Structure and Change of Character on a configurable higher timeframe, plotting labeled structure lines so you always know the current trend bias.
Swing Highs/Lows
Marks HH/LH/LL/HL swing points on a separate configurable timeframe, giving a clean read of higher-timeframe price action independent of your chart's timeframe.
Liquidity Pools
Tracks the last 5 unmitigated swing highs and lows as extending liquidity lines, automatically removing them once price sweeps through.
Order Blocks
Auto-detects bullish and bearish order blocks following a break of structure, with automatic mitigation (deletion) once price returns to tap them.
Premium/Discount Zones with Fibonacci Levels
Draws a dynamic zone from the latest swing structure with 15%/30%/50%/70%/85% fib levels, shading the "premium" (sell) and "discount" (buy) halves so you can visually gauge where price sits in the current range.
Nadaraya-Watson Envelope Filter
An optional smoothed regression filter (Gaussian-weighted) used to confirm entries are occurring at statistical extremes, not just at fib levels.
200 EMA (slope-colored)
A 200-period EMA (length adjustable) that changes color based on its own slope — teal when rising, red when falling — for an instant trend-bias read.
Auto Signals
Optional BUY/BUY PRIME and SELL/SELL PRIME labels that trigger when price taps the 70%/85% zones during a configurable session window (default NY session), with a daily signal cap to avoid overtrading. Alerts included.
Live Dashboard
Top-right panel showing current structure trend, last CHoCH direction, current zone status, and NW filter state at a glance.
Volume Profile (optional)
Builds a volume profile across the most recent swing range with POC (Point of Control) highlighted.
⚠️ This is a discretionary confluence tool, not a standalone signal system — always confirm with your own analysis and risk management.
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.