M := 8;{这是参数}
N := 3;{这是参数}
RSV := (CLOSE - LLV(LOW, N)) / (HHV(HIGH, N) - LLV(LOW, N)) * 100;
K := SMA(RSV, 5, 1);
D := SMA(K, 3, 1);
J := 3 * K - 2 * D;
主力曲线 := EMA(J, 6)/100, COLORRED, LINETHICK2;
散户曲线 := 100 * (HHV(HIGH, M) - CLOSE) / (HHV(HIGH, M) - LLV(LOW, M)), COLORFF8800, LINETHICK2;
AA1 := (CLOSE - LLV(LOW, 21)) / (HHV(HIGH, 21) - LLV(LOW, 21)) * 100;
AA2 := SMA(AA1, 13, 8);
走势 := CEILING(SMA(AA2, 13, 8))/100, COLORYELLOW;
VARA:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VARB:=SMA(ABS(LOW-VARA),13,1)/SMA(MAX(LOW-VARA,0),10,1);
VARC:=EMA(VARB,10);
VARD:=LLV(LOW,33);
VARE:=EMA(IF(LOW<=VARD,VARC,0),5);
吐资金:= IF(散户曲线>主力曲线 AND 散户曲线>走势 ,主力曲线-散户曲线,0);
吃资金:= IF(散户曲线>主力曲线 AND 散户曲线>走势 ,走势-主力曲线,0);
TC:=吐资金-吃资金,COLORYELLOW;
TUN资金:=IF(散户曲线<主力曲线 AND 散户曲线<走势 ,主力曲线-散户曲线,0);
CHI资金:=IF(散户曲线<主力曲线 AND 散户曲线<走势 ,走势-主力曲线,0);
CT:=TUN资金-CHI资金;
满仓:=1,COLORFF8800;
空仓:=0,COLOR0088FF;
持仓百分必:=1+(TC-CT)/100,COLORRED;
上持仓百分必:=IF(持仓百分必>满仓 , 持仓百分必-100,0),COLORFF8800;
下持仓百分必:=IF(持仓百分必<空仓,0-持仓百分必,0);
增量仓线:=主力曲线-走势;
ZC:=主力曲线-持仓百分必;
CC:=-(增量仓线+ZC);
CW:=持仓百分必-CC;
CCCW:=CC+CW;
ZS:=走势-CCCW;
CZ:=-ZS*100;
扩张率:=CZ/CLOSE,COLORYELLOW;
扩张率5:=SMA(扩张率, 5, 1),COLORYELLOW;
ZFF:((C-REF(C,1))/REF(C,1))*扩张率5 ,COLORCYAN;
;
ZUIJ:=CLOSE*(1+扩张率/100);
GJ:=HIGH;
信号:=HIGH-ZUIJ;
OO:=1-信号-(信号*持仓百分必-1);
增减强度:=-OO*信号,COLORRED;
O仓压力:=IF((持仓百分必+增减强度)>1,ABS(2-(持仓百分必+增减强度)),ABS(持仓百分必+增减强度)) ,COLORGREEN ;
仓压力:=IF(O仓压力>1,O仓压力-1,O仓压力) ,COLORGREEN ;
静压:=ABS(0.5-仓压力) ,COLORGREEN ;
盈利:=持仓百分必-信号,COLORWHITE;
盈利5:SMA(盈利, 5, 1),COLORWHITE;
明日持仓百分比H:=1-(1+(TC-CT)/100),COLORRED;
明日持仓百分比5:SMA( 明日持仓百分比H,5, 1),COLORGREEN;
PP5:SMA( 明日持仓百分比5,5, 1),COLORRED;
PP3:SMA( 明日持仓百分比5,3, 1),COLORYELLOW;