等级: 免费版
- 注册:
- 2022-4-2
- 曾用名:
|
或者不论日盘品种还是日盘品种直接下面这样
optime:=
(TIMETOT0(time)-TIMETOT0(opentime(1))>0 and TIMETOT0(time)-TIMETOT0(opentime(1))<=15*60) or
(TIMETOT0(time)-TIMETOT0(opentime(2))>0 and TIMETOT0(time)-TIMETOT0(opentime(2))<=15*60 ) or
(TIMETOT0(time)-TIMETOT0(opentime(3))>0 and TIMETOT0(time)-TIMETOT0(opentime(3))<=15*60) or
(TIMETOT0(time)-TIMETOT0(opentime(4))>0 and TIMETOT0(time)-TIMETOT0(opentime(4))<=15*60)
cltime:= (not(islastbar) and time=closetime(1)) or (ISLASTBAR and TIMETOT0(closetime(1))-TIMETOT0(DYNAINFO(207))<=60) or
(not(islastbar) and time=closetime(4)) or (ISLASTBAR and TIMETOT0(closetime(4))-TIMETOT0(DYNAINFO(207))<=60)
if optime or cltime then BEGIN
if bpkcond then begin
sellshort(holding<0,holding,thisclose);
buy(holding=0 and buy_filcond,lots,thisclose);
end
if spkcond then begin
sell(holding>0,holding,thisclose);
buyshort(holding=0 and sell_filcond,lots,thisclose);
end
end
|
|