等级: 免费版
- 注册:
- 2022-9-26
- 曾用名:
|
debug发现持仓回报和currenttime-ordert都闪烁, debugfile和程序如下:
2022-11-03 11:19:10.463 2TISREMAIN(0)0
2022-11-03 11:19:10.463 2currenttime-ordert0
2022-11-03 11:19:10.728 2thisremain200
2022-11-03 11:19:10.728 2nextremain0
2022-11-03 11:19:10.728 2ordert111822
2022-11-03 11:19:10.728 2cd0
2022-11-03 11:19:10.729 2TISREMAIN(0)1
2022-11-03 11:19:10.729 2currenttime-ordert88
2022-11-03 11:19:11.270 thisremain0
2022-11-03 11:19:11.270 nextremain0
2022-11-03 11:19:11.270 ordert144030
2022-11-03 11:19:11.270 cd0
2022-11-03 11:19:11.270 TISREMAIN(0)0
2022-11-03 11:19:11.271 currenttime-ordert-32119
2022-11-03 11:19:11.275 thisremain0
2022-11-03 11:19:11.275 nextremain0
2022-11-03 11:19:11.275 ordert144030
2022-11-03 11:19:11.275 cd0
2022-11-03 11:19:11.275 TISREMAIN(0)0
2022-11-03 11:19:11.276 currenttime-ordert-32119
2022-11-03 11:19:12.895 2thisremain0
2022-11-03 11:19:12.896 2nextremain0
2022-11-03 11:19:12.896 2ordert111910
2022-11-03 11:19:12.897 2cd0
2022-11-03 11:19:12.897 2TISREMAIN(0)0
2022-11-03 11:19:12.897 2currenttime-ordert2
2022-11-03 11:19:13.890 2thisremain200
2022-11-03 11:19:13.890 2nextremain0
2022-11-03 11:19:13.890 2ordert111822
2022-11-03 11:19:13.890 2cd0
2022-11-03 11:19:13.890 2TISREMAIN(0)1
2022-11-03 11:19:13.890 2currenttime-ordert91
2022-11-03 11:19:14.521 thisremain0
2022-11-03 11:19:14.521 nextremain0
2022-11-03 11:19:14.521 ordert144030
2022-11-03 11:19:14.521 cd0
2022-11-03 11:19:14.522 TISREMAIN(0)0
2022-11-03 11:19:14.522 currenttime-ordert-32116
2022-11-03 11:19:14.526 thisremain0
2022-11-03 11:19:14.526 nextremain0
策略程序如下:
GLOBALVARIABLE:ordert2=0;
GLOBALVARIABLE:cd2=0;
kd:=
IF kd and currenttime-ordert2>2 and time>TT and time<145800 and KK and TISREMAIN(0)=0 THEN BEGIN
tbuy(1,k3,lmt,IH04B-hd4,0,zh,nextif),GENERAL;
ordert2:=currenttime;
cd2:=1;
END
nextremain:=TREMAINQTY(1,zh,nextif);
thisremain:=TREMAINQTY(2,zh,thisif);
debugfile('D:\TEST.TXT','2thisremain%.0f',thisremain);
debugfile('D:\TEST.TXT','2nextremain%.0f',nextremain);
debugfile('D:\TEST.TXT','2ordert%.0f',ordert2);
debugfile('D:\TEST.TXT','2cd%.0f',cd2);
debugfile('D:\TEST.TXT','2TISREMAIN(0)%.0f',TISREMAIN(0));
debugfile('D:\TEST.TXT','2currenttime-ordert%.0f',currenttime-ordert2);
|
|