PROTECTED SOURCE SCRIPT
NWOG/NDOG by OutOfOptions

New Week Opening Gap (NWOG) and New Day Opening Gap (NDOG)
NWOG and NDOG represent price imbalances formed when markets skip over certain levels at the start of a new week or trading day. These gaps often serve as magnets for price action throughout the week or day, drawing prices back to fill them while also functioning as key support or resistance zones. They are particularly relevant in futures markets, though less so in equities.
Consequent Encroachment (CE)
The CE, which is the midpoint of an NWOG or NDOG, frequently emerges as a critical level—especially if the gap remains unbalanced. In such cases, it can exert a strong pull on price, encouraging retracement or consolidation.
Indicator Features
This indicator allows you to display any number of NWOGs and NDOGs directly on your chart, with complete customization of their visual appearance. You can assign distinct colors to the most recent gaps for easy identification. Unlike other tools, it includes a filtering option to exclude minor gaps that may lack significance. Additionally, the "Smart" mode intelligently positions price labels to ensure they remain visible and uncluttered at all times.
How Does it Work
The indicator tracks all daily closes and new day opens, capturing the two values representing the top/bottom of NDOG/NWOG. I If the day begins on a Sunday, the gap is identified as NWOG; otherwise, it is classified as NDOG. A key feature of the indicator is that it avoids duplicating NDOGs that are also NWOGs.
Next, the indicator applies the size filter setting (if set above 0) to skip minor gaps. Valid gaps are then displayed on the screen using a style configured in the indicator settings for the most recent NDOG/NWOG.
To prevent the chart from becoming cluttered, the indicator limits the number of NWOG/NDOGs shown. When a new NWOG/NDOG is added, it checks the total displayed, and if this exceeds the configured limit, the oldest NWOG/NDOG is removed. Additionally, the indicator updates the display style of the previous NWOG/NDOG to the generic (non-last) style as specified in the settings.
For labels showing NWOG/NDOG price ranges and CE, the indicator offers a "Smart" option that dynamically positions labels 10 bars from the last candle and adjusts them every 5 candles. Otherwise, labels are placed at the end of the week for NWOGs and at the end of the following day for NDOGs.
NWOG and NDOG represent price imbalances formed when markets skip over certain levels at the start of a new week or trading day. These gaps often serve as magnets for price action throughout the week or day, drawing prices back to fill them while also functioning as key support or resistance zones. They are particularly relevant in futures markets, though less so in equities.
Consequent Encroachment (CE)
The CE, which is the midpoint of an NWOG or NDOG, frequently emerges as a critical level—especially if the gap remains unbalanced. In such cases, it can exert a strong pull on price, encouraging retracement or consolidation.
Indicator Features
This indicator allows you to display any number of NWOGs and NDOGs directly on your chart, with complete customization of their visual appearance. You can assign distinct colors to the most recent gaps for easy identification. Unlike other tools, it includes a filtering option to exclude minor gaps that may lack significance. Additionally, the "Smart" mode intelligently positions price labels to ensure they remain visible and uncluttered at all times.
How Does it Work
The indicator tracks all daily closes and new day opens, capturing the two values representing the top/bottom of NDOG/NWOG. I If the day begins on a Sunday, the gap is identified as NWOG; otherwise, it is classified as NDOG. A key feature of the indicator is that it avoids duplicating NDOGs that are also NWOGs.
Next, the indicator applies the size filter setting (if set above 0) to skip minor gaps. Valid gaps are then displayed on the screen using a style configured in the indicator settings for the most recent NDOG/NWOG.
To prevent the chart from becoming cluttered, the indicator limits the number of NWOG/NDOGs shown. When a new NWOG/NDOG is added, it checks the total displayed, and if this exceeds the configured limit, the oldest NWOG/NDOG is removed. Additionally, the indicator updates the display style of the previous NWOG/NDOG to the generic (non-last) style as specified in the settings.
For labels showing NWOG/NDOG price ranges and CE, the indicator offers a "Smart" option that dynamically positions labels 10 bars from the last candle and adjusts them every 5 candles. Otherwise, labels are placed at the end of the week for NWOGs and at the end of the following day for NDOGs.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.