 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
ma5:ma(c,5);
ma20:ma(c,20);
cond1:cross(ma5,ma20);
cond2:cross(ma20,ma5);
if cond1 and holding<=0 then
begin
sellshort(1,holding,marketr);
ss:=if(numprofit(1)<0,entervol*2,1);
ss:=if(ss=32,1,ss);
buy(1,ss,marketr);
END
if cond2 and holding>=0 then
begin
sell(1,holding,marketr);
ss:=if(numprofit(1)<0,entervol*2,1);
ss:=if(ss=32,1,ss);
buyshort(1,ss,marketr);
END
if close>AVGENTERPRICE+3*mindiff or close<AVGENTERPRICE-3*mindiff then
begin
sell(1,holding,marketr);
sellshort(1,holding,marketr);
END
|
|