【问题标题】:Does the built-in function "highestbars" have bugs?内置函数“highestbars”有错误吗?
【发布时间】:2020-04-03 01:25:45
【问题描述】:

这里有一个简单的测试来证明这个问题:

//@version=4
study("Triangle",overlay=false)

length=input(title="Length",type=input.integer,defval=244)
long=input(title="Distance from 1 high",type=input.integer,defval=80)

x1=int(0)

x1:=-1*highestbars(length)>long?-1*highestbars(length):0
plot(x1,color=color.purple)

这是unexpected output

【问题讨论】:

    标签: built-in pine-script


    【解决方案1】:

    用途:

    h = highestbars(length)
    x1:=-1*h>long?-1*h:0
    

    【讨论】:

    • 非常感谢。它有效。感谢您解释原因。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-20
    • 1970-01-01
    • 2012-05-27
    • 2016-03-08
    • 2012-02-03
    • 2017-03-12
    相关资源
    最近更新 更多