【发布时间】:2020-10-01 14:01:48
【问题描述】:
我正在尝试在 pinescript 中使用 Alertfunction。我是编码的菜鸟,想修改现有的东西。
//警报
plotshape(longCondition, title = "Buy Signal", text ="LONG", textcolor = white, style=shape.labelup, size = size.normal, location=location.belowbar, color = green, transp = 0)
plotshape(shortCondition, title = "Sell Signal", text ="SHORT", textcolor = white, style=shape.labeldown, size = size.normal, location=location.abovebar, color = red, transp = 0)
alertcondition(longCondition,title="Long",message="Long @ ..")
alertcondition(shortCondition,title="Short",message="Short @ .. ")
我希望当策略具有买入警报时可选择多头警报,反之亦然。
如果有人可以帮助我解决我遗漏或做错的事情,我将不胜感激。
策略是可编译的,但当我想使用交易视图创建警报时没有任何选择。
谢谢!
【问题讨论】:
标签: pine-script