[PEL] 复制代码 IF HHV(HIGH,ENTERBARS+1)>=ENTERPRICE*1.1 and HHV(HIGH,ENTERBARS+1)<ENTERPRICE*1.2 and C<=HHV(HIGH,ENTERBARS+1)-(HHV(HIGH,ENTERBARS+1)-ENTERPRICE)*0.05 THEN BEGIN
SELL(1,CEILING(HOLDING/3),MARKET);//持仓手数可能除不尽,采用向上舍入处理
END
if HHV(HIGH,ENTERBARS+1)>=ENTERPRICE*1.2 and HHV(HIGH,ENTERBARS+1)<ENTERPRICE*1.3 and C<=HHV(HIGH,ENTERBARS+1)-(HHV(HIGH,ENTERBARS+1)-ENTERPRICE)*0.03 THEN BEGIN
SELL(1,CEILING(HOLDING/2),MARKET);
END
if HHV(HIGH,ENTERBARS+1)>=ENTERPRICE*1.3 and HHV(HIGH,ENTERBARS+1)<ENTERPRICE*1.4 and (C<=HHV(HIGH,ENTERBARS+1)-(HHV(HIGH,ENTERBARS+1)-ENTERPRICE)*0.01 OR (H>MAX(O,C)*1.1)) then BEGIN
SELL(1,HOLDING,MARKET);
end
if HHV(HIGH,ENTERBARS+1)>=ENTERPRICE*1.4 and CROSS(MA(C,10),C) then BEGIN
SELL(1,HOLDING,MARKET);
end
VOLMARGIN_D:ABS(ENTERPRICE*MULTIPLIER*HOLDING*TACCOUNT(41));
VOLMARGIN_K:ABS(ENTERPRICE*MULTIPLIER*HOLDING*TACCOUNT(42));
VOLMARGIN:IF(HOLDING>0,VOLMARGIN_D,VOLMARGIN_K);
if HHV(HIGH,ENTERBARS+1)>=ENTERPRICE*1.1 and HHV(HIGH,ENTERBARS+1)<ENTERPRICE*1.2 and OPENPROFIT/VOLMARGIN<0.05 then BEGIN
SELL(1,HOLDING,MARKET);
end
if HHV(HIGH,ENTERBARS+1)>=ENTERPRICE*1.2 and HHV(HIGH,ENTERBARS+1)<ENTERPRICE*1.3 and OPENPROFIT/VOLMARGIN<0.15 then BEGIN
SELL(1,HOLDING,MARKET);
end
|