等级: 免费版
- 注册:
- 2021-5-20
- 曾用名:
|
今天试跑了一下,发现5个周期没有卖单追单,帮我看看问题在哪里:
公式为:
GLOBALVARIABLE:cdbflag=0,cdsflag=0;
{撤单并追单策略//买}
BWCJ:=TREMAINQTY(1,'','');
condcdb:=BWCJ>0 and Nwcj=4 and barslast(CONDsell)>=barslast(CONDbuy) and exist(CONDsell,3)=0 and CONDsell=0;
IF condcdb and cdbflag=0 THEN BEGIN
TCANCELEX(1,1,'','');
cdbflag:=1;
END
if cdbflag=1 and TISREMAINEX(1,'','')=0 then BEGIN
tbuy(1,100%,mkt),PERTRADER;
cdbflag:=0;
END
{撤单并追单策略//卖}
SWCJ:=TREMAINQTY(2,'','');
condcds:=SWCJ>0 and Nwcj=5 and barslast(CONDsell)<barslast(CONDbuy) and exist(CONDBUY,4)=0 and (CONDBUY=0) ;
IF condcds=1 and cdsflag=0 THEN BEGIN
TCANCELEX(1,2,'','');
cdsflag:=1;
END
if cdsflag=1 and TISREMAINEX(2,'','')=0 then BEGIN
tsell(1,100%,mkt),PERTRADER;
cdsflag:=0;
END
|
|