ma20:=ma(c,20);
a5:=ma(asset,5);
variable:n=0;
if cross(close,ma20) and n=0 then begin
sellshort(1,0,market);
if holding=0 then begin
buy(holding=0,1,market);
n:=1;
end
end
if cross(ma20,close) and n=0 then begin
sell(1,0,market);
if holding=0 then begin
buyshort(holding=0,1,market);
n:=1;
end
end
if cross(asset,a5) and h>ma20 and n=1 then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if cross(asset,a5) and l<ma20 and n=1 then begin
sell(1,0,market);
buyshort(holding=0,1,market
联系客服