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
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.