用戶回復(fù):
variable:x=0;variable:y=0;if 開多平空條件 then begin平空:SELLSHORT(開多平空條件,0,MARKET); x:=0;endif 開空平多條件 then begin平多:SELL(開空平多條件,0,MARKET); y:=0;endif x<3 and 開多平空條件 then begin 開多:BUY(開多平空條件,手?jǐn)?shù),MARKET); x:=x+1;endif y<3 and 開空平多條件 then begin 開空:BUYSHORT(開空平多條件,手?jǐn)?shù),MARKET); y:=y+1;end當(dāng)前持倉:HOLDING,COLORGRAY,LINETHICK0;當(dāng)前資產(chǎn):ASSET,NOAXIS,COLORGRAY;
網(wǎng)友回復(fù):
我這樣做,為什么還是控制不了連續(xù)開倉次數(shù)呀?variable:x=0;variable:y=0;if 開多平空條件 then begin平空:SELLSHORT(開多平空條件,0,MARKET); x:=0;endif 開空平多條件 then begin平多:SELL(開空平多條件,0,MARKET); y:=0;endif x<3 and 開多平空條件 then begin 開多:BUY(開多平空條件,手?jǐn)?shù),MARKET); x:=x+1;endif y<3 and 開空平多條件 then begin 開空:BUYSHORT(開空平多條件,手?jǐn)?shù),MARKET); y:=y+1;end當(dāng)前持倉:HOLDING,COLORGRAY,LINETHICK0;當(dāng)前資產(chǎn):ASSET,NOAXIS,COLORGRAY;