variable:N=0;
variable:zs=0;
if holding=0 and 開倉條件 then BEGIN
buy(1,1,limitr,指定的價格);
end
if holding>0 and c>enterprice+20 and n<5 then begin
zs:=enterprice;
buy(1,1,marketr);
n:=n+1;
end
if holding>0 and n=0 and c<enterprice-20 then begin
sell(1,0,marketr);
end
if holding>0 and n>0 and c<zs-20 then begin
sell(1,0,marketr);
n:=0;
end
這里有“平倉后加倉次數重置為0”的設定
[此貼子已經被作者于2016-6-15 15:10:02編輯過]