Pine script 在脚本上创建绘图而不是标签

Pine script 在脚本上创建绘图而不是标签,pine-script,Pine Script,这是轴心点交易视图上的默认脚本 //@version=4 study("Pivot Points High Low", shorttitle="Pivots HL", overlay=true) lenH = input(title="Length High", type=input.integer, defval=10, minval=1) lenL = input(title="Length Low", type

这是轴心点交易视图上的默认脚本

//@version=4
study("Pivot Points High Low", shorttitle="Pivots HL", overlay=true)
lenH = input(title="Length High", type=input.integer, defval=10, minval=1)
lenL = input(title="Length Low", type=input.integer, defval=10, minval=1)
fun(src, len, isHigh, _style, _yloc, _color) =>
    p = nz(src[len])
    isFound = true
    for i = 0 to len - 1
        if isHigh and src[i] > p
            isFound := false
        if not isHigh and src[i] < p
            isFound := false
    for i = len + 1 to 2 * len
        if isHigh and src[i] >= p
            isFound := false
        if not isHigh and src[i] <= p
            isFound := false
    if isFound
        label.new(bar_index[len], p, tostring(p), style=_style, yloc=_yloc, color=_color)
fun(high, lenH, true, label.style_labeldown, yloc.abovebar, color.lime)
fun(low, lenL, false, label.style_labelup, yloc.belowbar, color.red)
/@version=4
研究(“轴心点高-低”,shorttitle=“轴心点高”,叠加=真)
lenH=input(title=“Length High”,type=input.integer,deffal=10,minval=1)
lenL=input(title=“Length Low”,type=input.integer,defval=10,minval=1)
乐趣(src、len、isHigh、风格、颜色)=>
p=nz(src[len])
isFound=true
对于i=0到len-1
如果isHigh和src[i]>p
isFound:=false
如果不是isHigh和src[i]

=p isFound:=false


如果不高,则src[i]正常。翻译困难

//@version=4
study("Help (Pivot Points High Low)", shorttitle="Pivots HL", overlay=true)
lenH = input(title="Length High", type=input.integer, defval=10, minval=1)
lenL = input(title="Length Low", type=input.integer, defval=10, minval=1)
//fun(src, len, isHigh, _style, _yloc, _color) =>
fun(src, len, isHigh) =>
    p = nz(src[len])
    isFound = true
    for i = 0 to len - 1
        if isHigh and src[i] > p
            isFound := false
        if not isHigh and src[i] < p
            isFound := false
    for i = len + 1 to 2 * len
        if isHigh and src[i] >= p
            isFound := false
        if not isHigh and src[i] <= p
            isFound := false
    if isFound
//        label.new(bar_index[len], p, tostring(p), style=_style, yloc=_yloc, color=_color)
        p

plotH = fun(high, lenH, true) //, label.style_label_down, yloc.abovebar, color.lime)
plotL = fun(low, lenL, false) //, label.style_label_up, yloc.belowbar, color.red)

plot(plotH, color=color.lime, linewidth=3, style=plot.style_circles, offset=-lenH)
plot(plotL, color=color.red,  linewidth=3, style=plot.style_circles, offset=-lenL)
/@version=4
研究(“帮助(轴心点高-低)”,shorttitle=“轴心点高”,overlay=true)
lenH=input(title=“Length High”,type=input.integer,deffal=10,minval=1)
lenL=input(title=“Length Low”,type=input.integer,defval=10,minval=1)
//乐趣(src、len、isHigh、风格、颜色)=>
乐趣(src、len、isHigh)=>
p=nz(src[len])
isFound=true
对于i=0到len-1
如果isHigh和src[i]>p
isFound:=false
如果不是isHigh和src[i]

=p isFound:=false


如果不是isHigh和src[i]如何使打印样式为连续圆?将参数
join=true
添加到函数
plot
。您能帮我解决这个问题吗?