OPEN-SOURCE SCRIPT
Atualizado ICT NDOG & NWOG [D4A]

NDWOG - New Day / Week Opening Gap
This script is based on popular open source script made by fadi.
How is this script different from the original:
- has additional option (set as default) to add one day to NDOG and NWOG, so the displayed gap date reflects the day when the gap is first utilized during London and NY sessions, as recommended numerous times by ICT himself (main reason for this fork)
- gap quadrants can be drawn if enabled and ATR based gap size is large enough (user customizable)
- more gap customization options have been added to help distinguish between the current and previous (historical) gaps
- gap date label format can be set according to your preference
- default settings are based on dark Trading View theme
- a few small bugs have been fixed
Overview
The script is designed for ICT traders operating mostly in the CME futures markets (NQ, MNQ, ES, and MES), but NWOG discovery works also in forex markets. The script automatically plots the opening gaps that serve as primary daily and weekly draw-on-liquidity levels.
- NDOG (New Day Opening Gap): Formed daily during the CME's 1-hour session break (5:00 PM to 6:00 PM ET), the NDOG captures the price difference between the 5:00 PM ET closing candle and the 6:00 PM ET opening candle. A new gap is created every weekday evening at 6:00 PM ET.
- NWOG (New Week Opening Gap): Created over the weekend between Friday’s 5:00 PM ET close and Sunday’s 6:00 PM ET market re-open. NWOGs are typically much wider than daily gaps, serving as macro liquidity targets for the entire trading week.
Every identified gap is displayed as a shaded range spanning its high and low extremes, bounded by horizontal levels at the top and bottom. It features middle line, known as C.E. (Consequent Encroachment) marking the 50% midpoint, optional quadrants and gap date label.
Within ICT methodology, opening gaps act as footprint markers for institutional orders. "Smart money" routinely targets these price imbalances; analyzing how price reacts—whether it bounces off the boundary, respects the midpoint, or closes the gap entirely helps traders gauge institutional sentiment.
Weekly & Daily Directional Bias
NWOG (Weekly Framework): Dictates the macro bias. Trading above the NWOG signals a bullish tone, whereas trading below implies a bearish outlook. The C.E. of the NWOG is a critical line as its clean rejection indicates trend continuation, while a strong break through the CE points to a full gap fill and signals potential trend reversal.
NDOG (Intraday Framework): Functions as the daily counterpart. Yesterday's NDOG highlights overnight institutional order flow shifts. Furthermore, multiple unfilled NDOGs from prior sessions act as magnetic liquidity pools during the London and NY Kill Zones.
SETTINGS
- NWOG - New Week Opening Gap - enable the display of NWOGs
- Current NWOG Fill/Border/C.E. - customize the current (the newest) weekly gap
- Previous NWOG Fill/Border/C.E. - customize all the previous weekly gaps (historical)
- Max NWOGs - select how many previous weekly gaps should be displayed on the chart
- Label - enable and customize gap date label
- NDOG - New Day Opening Gap - enable the display of NDOGs
- Hide Above - hide the daily gaps above specific timeframe
- Current NDOG Fill/Border/C.E. - customize the current (the newest) daily gap
- Previous NDOG Fill/Border/C.E. - customize all the previous daily gaps (historical)
- Max NDOGs - select how many previous daily gaps should be displayed on the chart
- Label - enable and customize gap date label
- Draw Quadrants (NDOG & NWOG) - draw quadrants in both daily and weekly gaps
- Threshold - the quadrants are drawn if they are bigger than this ATR threshold
- Only if Price Within the Gap - draw quadrants only if the price is currently inside of the gap. This option serves the purpose of minimizing chart clutter
- Add 1 day offset to date label - most similar scripts use by default the date of gap creation, however this script allows to increase the date by 1 day, thus adhering to ICT recommendations, so the displayed gap date is reflecting the first London and NY sessions after the gap has been created
- Date Format - customize the display of date
- Add left padding - it adds padding to the label, moving it more to the right
- Box Right 'Time Extension' - how far right should the NDOG/NWOG box be extended (time-based)
Note:
NDOG and NWOG created on the same weekend will overlap thus creating one box on the chart. You can still spot them by looking at their date labels: weekly gap labels are bigger and daily labels are smaller (based on script default settings).
The script should work on all timeframes, up to 1D.
-----------------
Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
This script is based on popular open source script made by fadi.
How is this script different from the original:
- has additional option (set as default) to add one day to NDOG and NWOG, so the displayed gap date reflects the day when the gap is first utilized during London and NY sessions, as recommended numerous times by ICT himself (main reason for this fork)
- gap quadrants can be drawn if enabled and ATR based gap size is large enough (user customizable)
- more gap customization options have been added to help distinguish between the current and previous (historical) gaps
- gap date label format can be set according to your preference
- default settings are based on dark Trading View theme
- a few small bugs have been fixed
Overview
The script is designed for ICT traders operating mostly in the CME futures markets (NQ, MNQ, ES, and MES), but NWOG discovery works also in forex markets. The script automatically plots the opening gaps that serve as primary daily and weekly draw-on-liquidity levels.
- NDOG (New Day Opening Gap): Formed daily during the CME's 1-hour session break (5:00 PM to 6:00 PM ET), the NDOG captures the price difference between the 5:00 PM ET closing candle and the 6:00 PM ET opening candle. A new gap is created every weekday evening at 6:00 PM ET.
- NWOG (New Week Opening Gap): Created over the weekend between Friday’s 5:00 PM ET close and Sunday’s 6:00 PM ET market re-open. NWOGs are typically much wider than daily gaps, serving as macro liquidity targets for the entire trading week.
Every identified gap is displayed as a shaded range spanning its high and low extremes, bounded by horizontal levels at the top and bottom. It features middle line, known as C.E. (Consequent Encroachment) marking the 50% midpoint, optional quadrants and gap date label.
Within ICT methodology, opening gaps act as footprint markers for institutional orders. "Smart money" routinely targets these price imbalances; analyzing how price reacts—whether it bounces off the boundary, respects the midpoint, or closes the gap entirely helps traders gauge institutional sentiment.
Weekly & Daily Directional Bias
NWOG (Weekly Framework): Dictates the macro bias. Trading above the NWOG signals a bullish tone, whereas trading below implies a bearish outlook. The C.E. of the NWOG is a critical line as its clean rejection indicates trend continuation, while a strong break through the CE points to a full gap fill and signals potential trend reversal.
NDOG (Intraday Framework): Functions as the daily counterpart. Yesterday's NDOG highlights overnight institutional order flow shifts. Furthermore, multiple unfilled NDOGs from prior sessions act as magnetic liquidity pools during the London and NY Kill Zones.
SETTINGS
- NWOG - New Week Opening Gap - enable the display of NWOGs
- Current NWOG Fill/Border/C.E. - customize the current (the newest) weekly gap
- Previous NWOG Fill/Border/C.E. - customize all the previous weekly gaps (historical)
- Max NWOGs - select how many previous weekly gaps should be displayed on the chart
- Label - enable and customize gap date label
- NDOG - New Day Opening Gap - enable the display of NDOGs
- Hide Above - hide the daily gaps above specific timeframe
- Current NDOG Fill/Border/C.E. - customize the current (the newest) daily gap
- Previous NDOG Fill/Border/C.E. - customize all the previous daily gaps (historical)
- Max NDOGs - select how many previous daily gaps should be displayed on the chart
- Label - enable and customize gap date label
- Draw Quadrants (NDOG & NWOG) - draw quadrants in both daily and weekly gaps
- Threshold - the quadrants are drawn if they are bigger than this ATR threshold
- Only if Price Within the Gap - draw quadrants only if the price is currently inside of the gap. This option serves the purpose of minimizing chart clutter
- Add 1 day offset to date label - most similar scripts use by default the date of gap creation, however this script allows to increase the date by 1 day, thus adhering to ICT recommendations, so the displayed gap date is reflecting the first London and NY sessions after the gap has been created
- Date Format - customize the display of date
- Add left padding - it adds padding to the label, moving it more to the right
- Box Right 'Time Extension' - how far right should the NDOG/NWOG box be extended (time-based)
Note:
NDOG and NWOG created on the same weekend will overlap thus creating one box on the chart. You can still spot them by looking at their date labels: weekly gap labels are bigger and daily labels are smaller (based on script default settings).
The script should work on all timeframes, up to 1D.
-----------------
Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Notas de Lançamento
- New option added: Consider if Bank Holiday + MultiplierThe new option uses different calculation method to find NDOG if standard method fails to find the gap. This may sometimes happen when there is Bank Holiday and the trading day is shorter that usually, eg. trading day stops at 12:59 instead of 16:59. In short this should guard against failure to find NDOG on some days.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.