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.
開源腳本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免責聲明
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.
開源腳本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免責聲明
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.