cond_long:=cross(c,ma(c,5));
cond_short:=cross(ma(c,5),c);
variable:ss=1;
if cond_long then buy(1,ss,marketr);
if cond_short then
begin
if NUMPROFIT( 1)>0 then ss:=ss+1;
if NUMPROFIT( 1)<0 then ss:=1;
buyshort(1,ss,marketr);
end
if time=150000 then
begin
sell();
sellshort();
end