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 TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.