[PEL] 复制代码 VARIABLE:mark1:=0,mark2:=0;;
ma5:ma(c,5);
ma10:ma(c,10);
majc:cross(ma5,ma10);
masc:cross(ma10,ma5);
if majc then
begin
sellshort(1,holding,market);
if holding=0 then
begin
buy(1,1,market);
mark1:=o;
end
end
if masc then
begin
sell(1,holding,market);
if holding=0 then
begin
buyshort(1,1,market);
mark2:=o;
end
end
if holding>0 and mark1<>0 and c<mark1 then
begin
多加仓:buy(1,1,market);
mark1:=0;
end
if holding<0 and mark2<>0 and c>mark2 then
begin
空加仓:buyshort(1,1,market);
mark2:=0;
end
以这个为准吧。 |