I am trying to adapt an existing study to suit intraday trading, where in the buy/sell signals has to generate after session open and exit at Session close. I have defined session
sess = input.session('0915-1525', title='Regular Session Time')
ta = time(timeframe.period, sess + ':1234567')
in_session = not na(ta)
i am using a while loop determining the session is live or not and to execute the codes.
while in_session
var int a
plot (a)
........
break()
however when i am making plot, fill, plotshape commands the below error is getting generated
line 84: Cannot use 'plot' in local scope line 89: Cannot use 'plot' in local scope line 90: Cannot use 'fill' in local scope line 91: Cannot use 'fill' in local scope line 93: Cannot use 'plotshape' in local scope line 94: Cannot use 'plotshape' in local scope
please advice how to overcome this?