processingclouds
Pine Script Master
Pine Script Master
Posts: 115
Joined: January 30th, 2022

Re: how do I highlight (bgcolor) 9 am utc-4 every day in the chart's history?

Hey,

Here is code to highlight every 9am-10am bar , you can change times as you require.

Code: Select all

// © processingclouds
// processingclouds For bugs, and to show your support you can contact me anytime here and @gmail

//@version=5
indicator("Highlight 9 am", overlay = true)
isBackColor = not na(time(timeframe.period, "0900-1000"))
bgcolor(isBackColor ? color.green : na)

Return to “Pine Script Q&A”