[英]Pinescript - How to Alert() just once the first time condition triggered
Tradingview Pinesctipt V5
我在我的策略中创建了 alert() 。 我希望我的警报在第一次条件满足时才发出警报,但每次条件满足时都继续发出警报。 我怎样才能解决这个问题。
if ta.cross(close,triggerprice)
alert("Price Trigger", alert.freq_once_per_bar)
谢谢
var isTriggered = false
if ta.cross(close,triggerprice) and not isTriggered
alert("Price Trigger", alert.freq_once_per_bar)
isTriggered := true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.