 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
GLOBALVARIABLE:ti:=TIMETOT0(currenttime ),ti2:=TIMETOT0(currenttime );
if TGLOBALSUBMITEX( 4,'' ,'' ,1 )>200 then
begin
TCANCEL(1,2);
ti:=TIMETOT0(currenttime );
END
if TGLOBALSUBMITEX( 4,'' ,'' ,1 )>200 then
begin
TCANCEL(1,2);
ti2:=TIMETOT0(currenttime );
END
if TIMETOT0(currenttime )>ti+100 then
begin
Tsell( cond and H>=REF(H,1) AND TBUYHOLDING(1)>=1,TBUYHOLDING(1),lMT, REF(H,1);
END
if TIMETOT0(currenttime )>ti2+100 then
begin
Tsellshort( cond and H>=REF(H,1) AND TsellHOLDING(1)>=1,TsellHOLDING(1),lMT, REF(H,1);
END
//开多和开空
if TGLOBALSUBMITEX( 1,'' ,'' ,1 )>200 then
begin
TCANCEL(1,1);
ti:=TIMETOT0(currenttime );
END
if TGLOBALSUBMITEX( 3,'' ,'' ,1 )>200 then
begin
TCANCEL(1,3);
END
这类操作pel实现起来很繁琐复杂的,上面只是简单例子,具体需要你你自己看下了,原则上只能通过自己不断记录变量来就 |
|