?
VARIABLE: buy_flag=0;
if buycond=1 and buy_flag=0 then BEGIN
buy(...),IGNORECHECKPRICE;
buy_flag:=1;?
??
end
if buy_flag=1 and 加倉(cāng)條件 then begin
buy(...),IGNORECHECKPRICE;
??
end
?
類似上面使用,全局變量進(jìn)行互鎖。需要注意一下2點(diǎn):
1.多空的,全局標(biāo)志,必須分開,不要串在一起用。
2.全局標(biāo)志,需要在平完倉(cāng)位等情況下(需要置零的時(shí)候)。從新置0 。否者后續(xù)無法開倉(cāng)。
[此貼子已經(jīng)被作者于2019/6/13 14:12:44編輯過]