P:=3;
LL:=13;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),P,1)/SMA(ABS(CLOSE-LC),P,1)*100;
买入:CROSS(RSI,LL);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
LLV(DX,2)=LLV(DX,6) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2));
n:=12;
HS:=vol/capital;
DD:=BIGORDER(1,2)-BIGORDER(2,2);
DT:=HS*DD*100;
主力持仓:= 50+Sum(DT,0);
创N日新高:主力持仓=hhv(主力持仓,n);