Page 1 of 1

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

Posted: Thu Apr 28, 2022 10:31 pm
by kovi
Thanks

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

Posted: Sun Feb 05, 2023 9:58 am
by processingclouds
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)