OPEN-SOURCE SCRIPT
Closing Range Levels

Turn the last few minutes of every block into ready-made support and resistance.
Closing Range Levels captures the high/low of the final X minutes of each block — for example, the last 3 minutes of every 4-hour block — and projects that range as two horizontal levels across the block that follows. Where price closed out a block often acts as reference support/resistance for the next one, and this draws it for you automatically, with full history on the chart.
Highlights
Objective levels drawn automatically — no manual work
Based on where the market actually closed, not round numbers
Full historical projection to see how levels behaved
Boundaries follow the chart's own clock, DST handled automatically
Inputs
Minutes before block end — capture window size (default 3)
Block length (hours) — the projection block (default 4)
Max historical blocks kept
Colors and line width
Notes
Works best when your chart timeframe divides the capture window evenly (e.g. a 3-minute chart with a 3-minute window) and on 24h markets like FX and crypto, where block boundaries land on clean grid times. Treat the band as a reference zone rather than a hard line — on fast blocks price can push through early.
Closing Range Levels captures the high/low of the final X minutes of each block — for example, the last 3 minutes of every 4-hour block — and projects that range as two horizontal levels across the block that follows. Where price closed out a block often acts as reference support/resistance for the next one, and this draws it for you automatically, with full history on the chart.
Highlights
Objective levels drawn automatically — no manual work
Based on where the market actually closed, not round numbers
Full historical projection to see how levels behaved
Boundaries follow the chart's own clock, DST handled automatically
Inputs
Minutes before block end — capture window size (default 3)
Block length (hours) — the projection block (default 4)
Max historical blocks kept
Colors and line width
Notes
Works best when your chart timeframe divides the capture window evenly (e.g. a 3-minute chart with a 3-minute window) and on 24h markets like FX and crypto, where block boundaries land on clean grid times. Treat the band as a reference zone rather than a hard line — on fast blocks price can push through early.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.