
runmode:0;
ma3x3:=ref(ma(close,3),3);
ma7x5:=ref(ma(close,7),5);
ma25x5:=ref(ma(close,25),5);
entrylongcond:=close>ma3x3 and ma3x3>ma7x5 and ma7x5>ma25x5;
exitlongcond:=ma3x3
entryshortcond:=closeexitshortcond:=ma3x3>ma7x5;
if holding=0 then begin
if entrylongcond then
buy(1,1,limitr,close);
if entryshortcond then
buyshort(1,1,limitr,close);
end
if holding>0 then begin
if exitlongcond then
sell(1,holding,limitr,close);
end
if holding<0 then begin
if exitshortcond then
sellshort(1,holding,limitr,close);
end
盈亏:asset-500000,noaxis,coloryellow,linethick2;