OPEN-SOURCE SCRIPT

Time Highlight

107
How This Works:
Time Conversion: The script converts the current time to HHMM format (e.g., 9:16 becomes 916) for easy comparison.

Timeframe Detection: It checks the current chart's timeframe:

For 1-minute charts: Exactly matches the target times

For 5-minute charts: Checks if the target time falls within the 5-minute window

For 15-minute charts: Checks if the target time falls within the 15-minute window

Highlighting: When the condition is met, it highlights the candle with a semi-transparent yellow color.

Note:
The script will work on 1-minute, 5-minute, and 15-minute timeframes only

The highlight appears on the candle that contains the specified time

The transparency is set to 70% so you can still see the candle through the highlight

You can adjust the transparency level by changing the transp parameter (0 = fully opaque, 100 = fully transparent).

make a pine script which change the color of the candle in yellow color in 1,5,15 timeframe at the time of 9:16, 9:31, 9:46

Disclaimer

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.