我正在编辑bolinger带松木脚本,如果价格比第一个条目下跌10%,我想添加第二个购买信号。这可能吗?我认为它将在 strategy.cancel(id =“ BBandLE”)之后?
if(交叉(来源,下限)) strategy.entry(“ BBandLE”,strategy.long,stop = lower,oca_name =“ BollingerBands”,oca_type = strategy.oca.cancel,comment =“购买”) 其他 strategy.cancel(id =“ BBandLE”)
if(crossunder(来源,上)) strategy.entry(“ BBandSE”,strategy.short,stop = upper,oca_name =“ BollingerBands”,oca_type = strategy.oca.cancel,comment =“关闭”) 其他 strategy.cancel(id =“ BBandSE”)