This is the correct script for Mondays
study(title="Week",shorttitle="Monday", overlay=true) nt = input('0930-1030', type=session, title="Not Trading") nttime = nt bgPlot2 = (time(period, nttime)) bgcolor(bgPlot2 and (dayofweek(time('D')) == monday)? yellow : na,transp=30,title="Time")