预测风险,有解盘文字(通达信公式 副图 源码 测试图)
{预测风险}MA20:=MA(CLOSE,20); MA60:=MA(CLOSE,60); MA120:=MA(CLOSE,120); MA240:=MA(CLOSE,240); P:=((2)*(CLOSE) + HIGH + LOW + OPEN)/(5); 中短A:=HHV(P,20); 中短B:=LLV(P,20); 中短C:=中短A - 中短B; 中短D:=(EMA((P - 中短B)/(中短C),2))*(100); 中A:=HHV(P,60); 中B:=LLV(P,60); 中C:=中A - 中B; 中D:=(EMA((P - 中B)/(中C),2))*(100); 中长A:=HHV(P,120); 中长B:=LLV(P,120); 中长C:=中长A - 中长B; 中长D:=(EMA((P - 中长B)/(中长C),2))*(100); 长A:=HHV(P,240); 长B:=LLV(P,240); 长C:=长A - 长B; 长D:=(EMA((P - 长B)/(长C),2))*(100); N:=20; RSV1:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100; K1A:=SMA(RSV1,10,1); D1B:=SMA(K1A,5,1); KKC:=INTPART(K1A); DDC:=INTPART(D1B); TFXXS:=KKC+DDC,LINETHICK0,COLORYELLOW; TGLXS:=(TFXXS-REF(TFXXS,1))*10,LINETHICK0,COLORGREEN; TYCFX:=TFXXS+TGLXS,LINETHICK0,COLORGREEN; A0:=(L+H+C*2)/4; A1C:=EMA(A0,N); A1X:=(A1C-REF(A1C,1))/REF(A1C,1)*100; XXX:=EMA((C-LLV(L,11))/(HHV(H,25)-LLV(L,11))*4,8)+1; XX:=IF(1=1,POW(XXX,2)-10,DRAWNULL); YYY:=EMA((INDEXC-LLV(INDEXL,11))/(HHV(INDEXH,25)-LLV(INDEXL,11))*4,8)+1; YY:=POW(YYY,2)-10; RSV2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100; K:=SMA(RSV2,3,1); D:=SMA(K,3,1); J:=3*K-2*D; KL:=CROSS(J,0); KH:=CROSS(100,J); LC:=REF(C,1); WRSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100; RL:=CROSS(WRSI,20); RH:=CROSS(80,WRSI); CCI背:=IF(LLV(CCI,2)>LLV(CCI,7) AND LLV(L,2)<=LLV(L,7) AND HHV(H,10)>MA(CLOSE,60),1,0),COLORWHITE; T1:=IF((DATE<=1090314),1,0); VAR7W:=REF(CLOSE,1); VAR8W:=((SMA(MAX(CLOSE-VAR7W,0),7,1))/(SMA(ABS(CLOSE-VAR7W),7,1)))*(100); VAR9W:=CROSS(70,VAR8W); VARA:=(FILTER(VAR9W,4))*(T1); BIAS1:=(C-MA(C,12))/MA(C,6)*100; BIAS2:=(C-MA(C,24))/MA(C,12)*100; BIAS3:=(C-MA(C,48))/MA(C,24)*100; BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6; 乖离:=MA(BIAS,6); 近期风险:TFXXS,NODRAW; 预测风险:TYCFX,NODRAW; 乖离系数:=TGLXS,NODRAW; 长线:长D,LINETHICK2,COLORWHITE; 中长线:中长D,LINETHICK2,COLOR990000; 中线:中D,LINETHICK2,COLORYELLOW; 中短线:中短D,LINETHICK2,COLORRED; DRAWTEXT(中短D<=8 AND 中D<=8 AND 中长D<=8 AND 长D<=8 AND ISLASTBAR,25,'关注底部'),COLORGREEN; DRAWTEXT(中短D<=20 AND 中D<=20 AND 中长D<=20 AND 长D<=20 AND ISLASTBAR,35,'安全弱势'),COLORGREEN; DRAWTEXT(中短D>=80 AND 中D>=80 AND 中长D>=80 AND 长D>=80 AND ISLASTBAR,75,'已有风险'),COLORGREEN; DRAWTEXT(中短D>93 AND 中D>93 AND 中长D>93 AND 长D>93 AND ISLASTBAR,65,'风险极高'),COLORGREEN; DRAWTEXT(近期风险/预测风险 >=1 AND ISLASTBAR,50,'短期减持'),COLORGREEN; DRAWTEXT(近期风险/预测风险<1 AND ISLASTBAR,50,'尚可持有'),COLORGREEN;