ma30:ma(c,30);
ma60:ma(c,60);
if cross(h,ma30) then begin
sellshort(1,1,market);
buy(holding=0,1,market);
end
if cross(h,ma60) then begin
sellshort(1,1,market);
buy(holding=1,1,market);
end
if cross(ma30,l) then begin
sell(1,1,market);
buyshort(holding=0,1,market);
end
if cross(ma60,l) then begin
sell(1,1,market);
buyshort(holding=-1,1,market);
end