Hi, I tried the below code, but the code is not taking today open to plot the values....

// returning the previous daily low and high
[Y_High, Y_Low] = security(syminfo.tickerid, D, [high[1], low[1]])
T_Open = security(syminfo.tickerid, 'D', open) // today open price
//Compute
Y_Range = Y_High - Y_Low
Sup = T_Open - (Y_Range/2)
Res = T_Open + (Y_Range/2)
//Plot the Indicator
plot(timeframe.isintraday ? Res : na, title=Resistance, style=plot.style_linebr, color=change(Res) ? na : color.red, linewidth=1)
plot(timeframe.isintraday ? Sup : na, title=Support, style=plot.style_linebr, color=change(Res) ? na : color.green, linewidth=1)