0

我已经设置了与我的 plotshape() 相同的 alertcondition() ,但是在图表上绘制形状时不会触发警报。

到目前为止我做了什么?尝试选择所有警报类型(即使在栏关闭后)似乎都不起作用,尝试在 plotshape 中添加标题并使用它来触发创建警报框中的警报设置条件。

plotshape(series=buySignal, title="newtitle", text="BUY",style=shape.triangleup, location=location.belowbar, color=color.green, size=size.normal)

似乎没有任何效果。

这是代码:-

isLong = false
isLong := nz(isLong[1], false)

isShort = false
isShort := nz(isShort[1], false)


buySignal = not isLong and (godlong1 or godlong2 or godlong3 or godlong4 or godlong5)


sellSignal= not isShort and (godshort1 or godshort2 or godshort3 or godshort4 or godshort5)

if (buySignal)
    isLong := true
    isShort := false

if (sellSignal)
    isLong := false
    isShort := true

plotshape(series=buySignal, text="BUY",style=shape.triangleup, location=location.belowbar, color=color.green, size=size.normal)
plotshape(series=sellSignal, text="SELL", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.normal)


alertcondition(buySignal, title='BUY LONG', message='Bulls Are Fast!!!')
alertcondition(sellSignal, title='SELL SHORT', message='Bears Are Slow!!!')

有人可以帮我解决这个问题,无法解决。

非常感谢提前

问候!

4

0 回答 0