OPEN-SOURCE SCRIPT
RTH Gap Detector with CE

### RTH Gap Detector with C.E.
This indicator detects the gap between the **9:30 AM ET RTH open** and the prior session’s **4:14 PM ET close**. It draws a box over the gap and marks its midpoint as **Consequent Encroachment (C.E.)**. The box extends until price fully fills the gap.
Gap grades are size-based, calculated as a percentage of the prior RTH close: **A** is at or above the Grade A threshold (**0.75% by default**), **B** is at or above the Grade B threshold (**0.25% by default**) but below A, and **C** is below B. These are customizable thresholds, not a separate ICT grading convention.
Settings let you filter small gaps, show or hide labels and the C.E. line, choose bullish/bearish or grade-based colors, and set the label size. By default, it keeps the **five most recent gaps**, including filled gaps. The default session uses New York time; on a 24-hour market such as BTC, it applies that time window to the chart’s prices.
This indicator detects the gap between the **9:30 AM ET RTH open** and the prior session’s **4:14 PM ET close**. It draws a box over the gap and marks its midpoint as **Consequent Encroachment (C.E.)**. The box extends until price fully fills the gap.
Gap grades are size-based, calculated as a percentage of the prior RTH close: **A** is at or above the Grade A threshold (**0.75% by default**), **B** is at or above the Grade B threshold (**0.25% by default**) but below A, and **C** is below B. These are customizable thresholds, not a separate ICT grading convention.
Settings let you filter small gaps, show or hide labels and the C.E. line, choose bullish/bearish or grade-based colors, and set the label size. By default, it keeps the **five most recent gaps**, including filled gaps. The default session uses New York time; on a 24-hour market such as BTC, it applies that time window to the chart’s prices.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。