I’m trying to figure out how I can color the background of my crude oil chart to show a different color during pit session (8am-1:30pm Chicago time). I can see there are some indicators that color the background based on price value or indicator value, but I can’t find any based on time.
To color the background based on a time conditions, you can do is as follow:
timec= time>080000 and time<120000
if timec then
backgroundcolor(0,168,0,60)
endif
return
Useful links about coloring the background of charts:
https://www.prorealcode.com/topics-tag/backgroundcolor/
BACKGROUNDCOLOR
@Nicolas It worked like a charm. You are the man!