内置函数"highestbars"有错误吗?



这里有一个简单的测试来演示这个问题:

//@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)

这是意外的输出。

使用:

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

相关内容

最新更新