如何解决此脚本的警报条件不起作用
我想在条形收盘价高于splus时表示警报条件,这意味着黄色框的绿线上方或黄色框的红线下方的负号下方,但此条件不起作用 感谢您的帮助
Patternz =input(true,title="Patternz")
signalB=(((high<high[1] and low>low[1] and high[1]<max(high[2],high[3]) and low[1]>min(low[2],low[3]) )))
signalA=((high<high[3] and high[1]<high[3] and high[2]<high[3] and low>low[3] and low[1]>low[3] and low[2]>low[3]))
signalC = ((((high<high[1] and low>low[1] and high[1]<max(high[2],low[3]) ))) ) or (((high<high[3] and high[1]<high[3] and high[2]<high[3] and low>low[3] and low[1]>low[3] and low[2]>low[3])))rf=1.5*atr(4)
SignalcloseC=valuewhen(signalC,close,0)
factorsC=valuewhen(signalC,rf,0)
signalplus=SignalcloseC+factorsC
signalminus=SignalcloseC-factorsC
splus =plot(Patternz and signalplus?signalplus:na,color=color.lime,linewidth=0)
sclose=plot(Patternz and SignalcloseC?SignalcloseC:na,color=color.black,linewidth=0)
sminus =plot(Patternz and signalminus?signalminus:na,color=color.orange,linewidth=0)
fill(splus,sminus,color=color.yellow,title="Patternz BG",transp=80)
plotchar(signalA==true,text="C",textcolor=color.black)
plotchar(signalB==true,color=color.blue,text="A",textcolor=color.black)
var line ul=na
if signalB==true or signalA==true
ul:=line.new(bar_index,high,bar_index[3],high[3],width=0)
else
ul:=na
var line bl=na
if signalB==true or signalA==true
bl:=line.new(bar_index,low,low[3],width=0)
else
bl:=na
patternbull = crossover(SignalcloseC,factorsC)
patternbear = crossunder(factorsC,factorsC)
alertcondition(condition= patternbull or patternbear,message="Patternz{{ticker}} : {{close}} ")
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。