Please help me to extend the plotted line till the end of present trading session. So that, the levels may appear on the chart from the beginning of current trading session.
//@version=5
indicator(title="fff", overlay=true)
// Get user input
disableRepaint = input.bool(title ="Disable Repainting?", defval=true)
pdl = request.security(syminfo.tickerid, "D", low[disableRepaint and barstate.isconfirmed ? 0 : 1])
pdh = request.security(syminfo.tickerid,"D", high[disableRepaint and barstate.isconfirmed ? 0 : 1])
P1 = (pdh-(pdh-pdl) * 0.756)
P2 = (pdl+(pdh-pdl) * 0.790)
//gaps = barmerge.gaps_off, lookahead = barmerge.lookahead_off) //Does not repaint
plot(P1 == P1[1] ? P1 : na, style=plot.style_linebr,color=color.white, linewidth=2)
plot(P2 == P2[1] ? P2 : na, style=plot.style_linebr,color=color.white,linewidth=2)