[英]how to avoid multiple alerts after condition is met?
当满足条件时,我有一个策略,只有一个警报应该触发,而不是每根蜡烛。 我想自动化交易。 代码如下
if longsignal
strategy.entry(id="Long", direction=strategy.long)
alert(message = 'long entry',alert.freq_once_per_bar_close)
也许从策略属性选项卡中将金字塔设置为 1 和/或执行类似的操作
if longsignal and not longsignal[1]
strategy.entry(id="Long", direction=strategy.long)
alert(message = 'long entry',alert.freq_once_per_bar_close)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.