问题描述
我想在条形收盘价高于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 (将#修改为@)