没有行延续的 Pine Script 错误行尾

问题描述

我正在考虑在 pine 脚本上创建一条平均三个的趋势线。到目前为止,如果我不使用 3 的平均值,它可以工作,但如果我使用,它会出现错误:不匹配的输入“看跌”期待“没有行延续的行尾”。

trendLength_1 = input(title = "Trend Length_1:",defval = 10)
trendLength_2 = input(title = "Trend Length_2:",defval = 20)
trendLength_3 = input(title = "Trend Length_3:",defval = 30)

trend_1 = lowest(security_low,trendLength_1) + ((highest(security_high,trendLength_1) - lowest(security_low,trendLength_1)) / 2)
trend_2 = lowest(security_low,trendLength_2) + ((highest(security_high,trendLength_2) - lowest(security_low,trendLength_2)) / 2)
trend_3 = lowest(security_low,trendLength_3) + ((highest(security_high,trendLength_3) - lowest(security_low,trendLength_3)) / 2)
trend = (0.5 * trend_1) + (0.3 * trend_2) + (0.2 * trend_3)

bearish = true

for i = 0 to trendConfirmationLength - 1
        bearish := bearish and (security_close[i] < trend[i])

如果有人能发现语法错误,我们将不胜感激。谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)