为什么用 pine 脚本绘制的线比普通绘图对象宽?

Why line drawn by pine script is wider than regular drawing object?

为什么用 pine 脚本绘制的线比绘图工具栏中的常规线宽?

这是我画线的方法:

line.new(startTime, lower_border_1, endTime, lower_border_1, xloc = xloc.bar_time, extend = extend.both, width = 1, color = falseBreakoutLineColor, style=line.style_dashed)

似乎您的 line.new() 调用在每个柱上执行 - 因此该行变为 'bold' 与前一个重叠。

下面是演示问题的片段:

//@version=5
indicator("line")
// global context, executed on each bar of the chart.
line.new(time[1], 0, time, 0, xloc = xloc.bar_time, extend = extend.both, width = 1, color = color.orange, style=line.style_dashed)

// local if scope, executed only if true.
if barstate.islast
    line.new(time[1], 1, time, 1, xloc = xloc.bar_time, extend = extend.both, width = 1, color = color.orange, style=line.style_dashed)