OPEN-SOURCE SCRIPT
Candles by Day, Time, Month + Stats

This Pine Script allows you to filter and display candles based on:
๐ Specific days of the week
๐ Custom intraday time ranges (e.g., 9:15 to 10:30)
๐ Selected months
๐ Shows stats for each filtered block:
๐ผ Range (High โ Low)
๐ Average candle body size
โ๏ธ Key Features:
โ Filter by day, time, and month
๐ Toggle to show/hide the stats label
๐ฉ Candles are drawn only for selected conditions
๐ Stats label is positioned above session high (adjustable)
โ ๏ธ Important Setup Instructions:
โ 1. Use it on a blank chart
To avoid overlaying with default candles:
Open the chart of your preferred symbol
Click on the chart type (top toolbar: "Candles", "Bars", etc.)
Select "Blank" from the dropdown (this will hide all native candles)
Apply this indicator
This ensures only the filtered candles from the script are visible.
Adjust for your local timezone
This script uses a hardcoded timezone: "Asia/Kolkata"
If you are in a different timezone, change it to your own (e.g. "America/New_York", "Europe/London", etc.) in all instances of:
time(timeframe.period, "Asia/Kolkata")
timestamp("Asia/Kolkata", ...)
Use Cases:
Opening range behavior on specific weekdays/months
Detecting market anomalies during exact windows
Building visual logs of preferred trade hours
๐ Specific days of the week
๐ Custom intraday time ranges (e.g., 9:15 to 10:30)
๐ Selected months
๐ Shows stats for each filtered block:
๐ผ Range (High โ Low)
๐ Average candle body size
โ๏ธ Key Features:
โ Filter by day, time, and month
๐ Toggle to show/hide the stats label
๐ฉ Candles are drawn only for selected conditions
๐ Stats label is positioned above session high (adjustable)
โ ๏ธ Important Setup Instructions:
โ 1. Use it on a blank chart
To avoid overlaying with default candles:
Open the chart of your preferred symbol
Click on the chart type (top toolbar: "Candles", "Bars", etc.)
Select "Blank" from the dropdown (this will hide all native candles)
Apply this indicator
This ensures only the filtered candles from the script are visible.
Adjust for your local timezone
This script uses a hardcoded timezone: "Asia/Kolkata"
If you are in a different timezone, change it to your own (e.g. "America/New_York", "Europe/London", etc.) in all instances of:
time(timeframe.period, "Asia/Kolkata")
timestamp("Asia/Kolkata", ...)
Use Cases:
Opening range behavior on specific weekdays/months
Detecting market anomalies during exact windows
Building visual logs of preferred trade hours
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.