Mis à jour

New Day Opening Gap NDOG

992
This Pine Script plots the New Day Open Gap (NDOG) — the price gap between the previous day’s 5:00 PM NY close and the current day’s 6:00 PM NY open (excludes weekends). It displays the gap as a semi-transparent box and draws multiple reference levels across the trading day:

  • NDOG High and Low (gap lines)
  • Consequent Encroachment
  • Quartile / Quadrant lines (.25 / .75)
  • 1/8th lines (.125 / .375 / .625 / .875)
  • Optional previous 5 PM close line (extendable)
  • Optional High-Low Gap box (previous day 5 PM candle extremes vs current day 6 PM open)


Premium / Discount Table
A real-time table shows whether current price is trading at a premium or discount relative to the average of the last several NDOG ranges (user-selectable count).
Additional Features

  • Day-specific colors (Monday–Friday) for boxes and lines
  • Last two Monday NDOGs and last two Friday NDOGs (toggleable)
  • Full Premium / Discount gradient levels with optional labels
  • Right-extension of all boxes and lines
  • Historical boxes/lines/labels control
  • Label positioning and sizing options
  • Timezone offsets for non-US indices
  • “No plot session” to stop painting during specified hours while still extending right


Intended Use
Designed primarily for SPX, ES, NQ, and major indices on intraday timeframes up to the selected maximum (default 15 min). The indicator helps identify institutional reference levels, gap-fill probability zones, and premium/discount conditions for the trading day.
All visuals are fully customizable through grouped inputs. No repainting, no external data required.
Notes de version
1. Added FVGs which overlay NDOG gradient levels.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.