加上提前下單的代碼后,交易圖表中的買賣信號都消失了
作者:金字塔 來源:cxh99.com 發布時間:2016年07月17日
- 咨詢內容:
我在策略中加入了加上提前下單的代碼后,交易圖表中的買賣信號都消失了,請問是什么原因。代碼如下:abb:=((time0-timetot0(dynainfo(207))<=tq) and not(islastbar)) or (islastbar and (time0-timetot0(dynainfo(207))<=tq0));if abb then begin平多1:SELL(平1 and 可平>0,可平,Market);平多2:SELL(平2 and 可平>0,可平,Market);平多3:SELL(平3 and 可平>0,可平,Market);平多4:SELL(平4 and 可平>0,可平,Market);開多1:BUY(開1 AND 開 AND HOLDING<=0,手數,Market);開多2:BUY(開2 AND 開 AND HOLDING<=0,手數,Market);end
觸發時機切換成了固定時長
- 金字塔客服:
看下開1和開的條件是否都滿足
- 用戶回復:
滿足。只要我去掉 if abb then begin,k線圖中的買賣點就都出來了。
和使用(dynainfo(207))是否有關系,他是什么意思
- 網友回復:
是最新的時間,和這個沒有關系
- 網友回復:
p1:=time>091500 and time<151000;p2:=if(islastbar,dynainfo(207),time);p3:=time0-timetot0(p2),linethick0;
IF A AND p3<=5 then.............
這個5就是你提前下單時間(秒);對于不活躍的品種你可以把dynainfo(207)換成currenttime