This will plot what you're asking:
//@version=4
study("Line", overlay=true)
bars_back = input(10)
draw_hline = input(true)
var line myLine = line.new(na, na, na, na, extend = draw_hline ? extend.both : extend.right, color=color.yellow, style=line.style_dashed, width=2)
ll = lowest(bars_back)
lb = lowestbars(bars_back) // returns a negative offset number
line.set_xy1(myLine, bar_index + lb, ll)
line.set_xy2(myLine, bar_index, ll)
Example:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…