PROTECTED SOURCE SCRIPT
NDOG [派大星]

🧠 Indicator Description — “NDOG [Patrick Star]”
This indicator visualizes Night-Day Opening Gaps (NDOG) based on the custom trading session timing used in U.S. markets.
Instead of using the standard daily candle change, it detects gaps between the 16:59 close and the 18:00 open (New York time, UTC-4).
Whenever the market reopens after the evening pause (from 16:59 → 18:00),
the script measures the price difference between the previous session’s close and the new session’s open,
then draws a shaded box to highlight the opening gap region.
🟦 Bullish Gap (Upward) — when the new session opens above the previous close.
🟪 Bearish Gap (Downward) — when the new session opens below the previous close.
You can control the maximum number of displayed gaps with the “Amount” setting.
This custom session logic allows more accurate visualization of after-hours transitions for futures or extended-hours instruments (e.g., ES, NQ, SPY).
This indicator visualizes Night-Day Opening Gaps (NDOG) based on the custom trading session timing used in U.S. markets.
Instead of using the standard daily candle change, it detects gaps between the 16:59 close and the 18:00 open (New York time, UTC-4).
Whenever the market reopens after the evening pause (from 16:59 → 18:00),
the script measures the price difference between the previous session’s close and the new session’s open,
then draws a shaded box to highlight the opening gap region.
🟦 Bullish Gap (Upward) — when the new session opens above the previous close.
🟪 Bearish Gap (Downward) — when the new session opens below the previous close.
You can control the maximum number of displayed gaps with the “Amount” setting.
This custom session logic allows more accurate visualization of after-hours transitions for futures or extended-hours instruments (e.g., ES, NQ, SPY).
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.