OPEN-SOURCE SCRIPT
NQ 5m Structure

This indicator combines four core SMC/ICT concepts into one clean, minimal overlay — designed for NQ and MNQ futures traders on the 5m chart.
Swing Rays
Confirms pivot highs and lows using configurable swing length. Each confirmed point prints a short dashed ray extending right — marking unmitigated structural levels without cluttering the chart with infinite lines.
Auto Fib Retracement
Automatically anchors a Fibonacci retracement to the most recent confirmed swing leg. Draws 0 / 0.382 / 0.5 / 0.618 / 1 levels and updates direction based on whether the last pivot was a high or low. Use the 0.618 zone for OTE entries in line with bias.
Dual Timeframe EMA Bias
Plots EMA 20 and EMA 50 on both the current timeframe and a configurable HTF (default 15m). The bias label shows four states:
▲ LONG [15m+5m] — full conviction long
▼ SHORT [15m+5m] — full conviction short
▲ HTF LONG / 5m ▼ — caution, pullback in uptrend
▼ HTF SHORT / 5m ▲ — caution, bounce in downtrend
Liquidity Levels
Detects equal highs (EQH) and equal lows (EQL) within a configurable threshold — the stacked liquidity pools NQ targets before reversing. Equal levels print solid and bright. Regular swing BSL/SSL print faded and dashed. When a level is swept (wick through, close back) it turns gray with a ✂ tag.
Settings:
Swing Length (default 7 for NQ/MNQ)
Ray Length (default 20)
EMA Fast/Slow (default 20/50)
HTF Timeframe (default 15m)
Fib Extension (default 60 bars)
Equal H/L Threshold % (default 0.05%)
Liquidity Ray Length (default 30)
Recommended Use:
Wait for HTF and LTF bias to agree (green or red label)
Identify nearest EQH or EQL as the draw on liquidity
Wait for price to sweep the level and retrace into the 0.618–0.705 OTE zone
Enter on bullish or bearish candle close confirmation at the fib level
Instruments: NQ, MNQ, MGC, CL, MCL
Timeframe: Best on 5m — use 15m for bias confirmation
Swing Rays
Confirms pivot highs and lows using configurable swing length. Each confirmed point prints a short dashed ray extending right — marking unmitigated structural levels without cluttering the chart with infinite lines.
Auto Fib Retracement
Automatically anchors a Fibonacci retracement to the most recent confirmed swing leg. Draws 0 / 0.382 / 0.5 / 0.618 / 1 levels and updates direction based on whether the last pivot was a high or low. Use the 0.618 zone for OTE entries in line with bias.
Dual Timeframe EMA Bias
Plots EMA 20 and EMA 50 on both the current timeframe and a configurable HTF (default 15m). The bias label shows four states:
▲ LONG [15m+5m] — full conviction long
▼ SHORT [15m+5m] — full conviction short
▲ HTF LONG / 5m ▼ — caution, pullback in uptrend
▼ HTF SHORT / 5m ▲ — caution, bounce in downtrend
Liquidity Levels
Detects equal highs (EQH) and equal lows (EQL) within a configurable threshold — the stacked liquidity pools NQ targets before reversing. Equal levels print solid and bright. Regular swing BSL/SSL print faded and dashed. When a level is swept (wick through, close back) it turns gray with a ✂ tag.
Settings:
Swing Length (default 7 for NQ/MNQ)
Ray Length (default 20)
EMA Fast/Slow (default 20/50)
HTF Timeframe (default 15m)
Fib Extension (default 60 bars)
Equal H/L Threshold % (default 0.05%)
Liquidity Ray Length (default 30)
Recommended Use:
Wait for HTF and LTF bias to agree (green or red label)
Identify nearest EQH or EQL as the draw on liquidity
Wait for price to sweep the level and retrace into the 0.618–0.705 OTE zone
Enter on bullish or bearish candle close confirmation at the fib level
Instruments: NQ, MNQ, MGC, CL, MCL
Timeframe: Best on 5m — use 15m for bias confirmation
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.