
runmode:0;
min5open:=callstock(stklabel,vtopen,2,-1);
min5close:=callstock(stklabel,vtclose,2,-1);
min15open:=callstock(stklabel,vtopen,3,-1);
min15close:=callstock(stklabel,vtclose,3,-1);
min30open:=callstock(stklabel,vtopen,4,-1);
min30close:=callstock(stklabel,vtclose,4,-1);
entrylongcond:=min5close>min5open and min15close>min15open and min30close>min30open;
entryshortcond:=min5close
if holding=0 then begin
if entrylongcond then
buy(1,1,limitr,open);
if entryshortcond then
buyshort(1,1,limitr,open);
end
if holding>0 then begin
if time>=closetime(0) then
sell(1,holding,limitr,close);
end
if holding<0 then begin
if time>=closetime(0) then
sellshort(1,holding,limitr,close);
end
盈亏:asset-500000,noaxis,coloryellow,linethick2;