if (isStop[ref]=2 or turn=2) and ((Close[ref]>Bcost and Bcost>0) or AllowLost=1) then begin
sell("KL") all contracts next bar at market;
isLong=0; isTrace=1; isShort=0;
PP=Close[0];
end;
控制點 在 那個 參數 REF, 不是 THIS 或 NEXT BAR
if MinDist > 0 and Slost-Low[0]<Dist points and Low[0]>=Slost1 and Slost<Scost
and BreakEven > 0
and ((EntryTime(0)<time and EntryDate(0)=date) or EntryDate(0)<date) then begin
BuytoCover("TS1") Round(Cnt/2,0) contracts next bar at Slost stop;
PP=Slost;
end;
這個控制點 在 [0] 不是 next bar
而 at XXX stop 只能 配合 next bar,要控制 是使用 [0]
if MinDist > 0 and Slost-Low[0]<Dist points and Low[0]<Slost1 and Slost<Scost
and BreakEven > 0
and ((EntryTime(0)<time and EntryDate(0)=date) or EntryDate(0)<date)
and Close[0]>Slost1 then begin
BuytoCover("TS") Round(Cnt/2,0) contracts this bar on close;
PP=Close[0];
end;
不是採用 next bar
而是採用 this bar on close