OPEN-SOURCE SCRIPT
Time Colors

Time Colors – Custom Trading Sessions Visualizer
Time Colors is a simple visual helper for backtesting and intraday trading.
It lets you define up to 10 custom time blocks and highlights the chart background during those periods.
Use it to:
Features
How to use
Time Colors is a simple visual helper for backtesting and intraday trading.
It lets you define up to 10 custom time blocks and highlights the chart background during those periods.
Use it to:
- Mark the exact times when you are realistically able to trade
- Visually separate different sessions (e.g. London, New York, Asia)
- Filter out “dream trades” that happened while you were sleeping or at work
Features
- Up to 10 fully customizable time blocks
- Individual on/off toggle for each block
- Custom color for every block
- Works on any intraday timeframe
- Session resolution input for flexible time handling
How to use
- Add the Time Colors indicator to your chart.
- Set each Time Block to your personal trading hours (based on your TradingView timezone).
- Disable blocks you don’t need with “Enable Block X”.
- When backtesting, only count trades that occur inside the colored areas – those are the times you could have actually taken trades.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.