 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- gxx978
|
以夜盘品种为例,参考如下:
CD:CLOSETIME(0)=CLOSETIME(4); //等于1为夜盘品种
if cd=1 then BEGIN
if TIMETOT0(time)-TIMETOT0(opentime(1))>0 and TIMETOT0(time)-TIMETOT0(opentime(1))<=15*60 then
buy(date=1230511,1,market);
if TIMETOT0(time)-TIMETOT0(opentime(2))>0 and TIMETOT0(time)-TIMETOT0(opentime(2))<=15*60 then
buy(date=1230511,1,market);
if TIMETOT0(time)-TIMETOT0(opentime(3))>0 and TIMETOT0(time)-TIMETOT0(opentime(3))<=15*60 then
buy(date=1230511,1,market);
if TIMETOT0(time)-TIMETOT0(opentime(4))>0 and TIMETOT0(time)-TIMETOT0(opentime(4))<=15*60 then
buy(date=1230511,1,market);
END
if cd=1 then BEGIN
if (not(islastbar) and time=closetime(1)) or (ISLASTBAR and TIMETOT0(closetime(1))-TIMETOT0(DYNAINFO(207))<=60) then
buy(date=1230511,1,market); //夜盘收盘提前60秒
if (not(islastbar) and time=closetime(4)) or (ISLASTBAR and TIMETOT0(closetime(4))-TIMETOT0(DYNAINFO(207))<=60) then
buy(date=1230511,1,market); //白盘收盘提前60秒
END |
|