开仓条件加入
abs(valuewhen(todaybar=1,open)-ref(todaybar,c))/ref(todaybar,c)<0.01
加上之后没有任何交易了
写反了,要这样写:
abs(valuewhen(todaybar=1,open)-ref(c,todaybar))/ref(c,todaybar)<0.01
开仓条件加入:abs(valuewhen(todaybar=1,open)-ref(c,todaybar))/ref(c,todaybar)>=0.01 and todaybar>60
60是1分钟周期1个小时的k线数,其他的周期做对应修改