用戶回復:
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(開多平空條件,手數,MARKET); x:=x+1;endif y<3 and 開空平多條件 then begin 開空:BUYSHORT(開空平多條件,手數,MARKET); y:=y+1;end當前持倉:HOLDING,COLORGRAY,LINETHICK0;當前資產:ASSET,NOAXIS,COLORGRAY;
網友回復:
我這樣做,為什么還是控制不了連續開倉次數呀?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(開多平空條件,手數,MARKET); x:=x+1;endif y<3 and 開空平多條件 then begin 開空:BUYSHORT(開空平多條件,手數,MARKET); y:=y+1;end當前持倉:HOLDING,COLORGRAY,LINETHICK0;當前資產:ASSET,NOAXIS,COLORGRAY;