ma5:ma(close,5);
a1:=ref(close,1);
a2:=ref(close,2);
a3:=ref(close,3);
a4:=ref(close,4);
a5:=a4>ref(ma5,4);
a6:=a3>ref(ma5,3);
a7:=a2>ref(ma5,2);
a8:=a1>ref(ma5,1);
a:=a5 and a6 and a7 and a8;
c1:=close>open;
//做多条件
if holding=0 and a and c1
then begin
buy(1,1,marketr);
end
//止盈
if holding>0 and close<ma5
then begin
sell(1,0,marketr);
end