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