 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- FireScript
|
ma1:ma(c,n);
var1:=cross(c,ma1);
var2:=h>tenterprice+zy and tenterbars>0;
vbr1:=cross(ma1,c);
vbr2:=l<tenterprice-zy and tenterbars>0;
//平多
if var2 and tbuyholdingex('','',1)>0 then begin
tsell(1,0,lmt,close);//市价(marketr)挂单价(limitr)
end
//平空
if vbr2 and tsellholdingex('','',1)>0 then begin
tsellshort(1,0,lmt,close);
end
//平空开多
if var1 and tsellholdingex('','',1)>=0 and abb then begin
tsellshort(1,0,lmt,close);
tbuy(1,ss,lmt,close);
end
//平多开空
if vbr1 and tbuyholdingex('','',1)>=0 and abb then begin
tsell(1,0,lmt,close);
tbuyshort(1,ss,lmt,close);
end |
|