input:n1(60,5,120,5);
input:n2(20,5,120,5);
input:n3(5,5,120,5);
ma1:=ma(close,n1);
ma2:=ma(close,n2);
ma3:=ma(close,n3);
longcond:=ref(all(ma1>ref(ma1,1),2) and all(ma2<ref(ma2,1),2) and all(ma3>ref(ma3,1),2),1);
shortcond:=ref(all(ma1<ref(ma1,1),2) and all(ma2>ref(ma2,1),2) and all(ma3<ref(ma3,1),2),1);
if holding=0 then begin
if longcond then
buy(1,1,limitr,open);
end
if holding=0 then begin
if shortcond then
buyshort(1,1,limitr,open);
end
if holding>0 then begin
if shortcond then begin
sell(1,holding,limitr,open);
buyshort(1,1,limitr,open);
end
if time=150000 then
sell(1,holding,limitr,open);
end
if holding<0 then begin
if longcond then begin
sellshort(1,holding,limitr,open);
buy(1,1,limitr,open);
end
if time=150000 then
sellshort(1,holding,limitr,open);
end
收益:asset,noaxis,colorred;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;