SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
饱和度:IF(SAT>1,1,SAT)*100,LINETHICK0;
{增加率:(SAT-REF(SAT,1))/REF(SAT,1)*100,LINETHICK0;}
量能≤5:STICKLINE(饱和度<=5,5,饱和度+20,4,0),COLORRED;
量能15~80:STICKLINE((饱和度>15 AND 饱和度< 80),5,饱和度+8,4,0),COLOR5290FF;
量能5~15:STICKLINE((饱和度>5 AND 饱和度< 15),5,饱和度+8,4,0),COLORYELLOW;
量能80~97:STICKLINE((饱和度>80 AND 饱和度< 97),5,饱和度,4,0),COLORFFCC00;
量能≥97:STICKLINE(饱和度>=97,5,饱和度,4,0),COLORGREEN;
VAR21:=LLV(LOW,33);
VAR31:=HHV(HIGH,21);
VAR41:=EMA((CLOSE-VAR21)/(VAR31-VAR21)*100,20)*0.998;
当前安全度:100-EMA(0.667*REF(VAR41,1)+0.333*VAR41,1),LINETHICK0 ,COLORRED;
VAR1:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR2:=SMA(VAR1,20,1);
VAR3:=SMA(VAR2,15,1);
VAR4:=(3*VAR2+2*VAR3)/4;
VAR5:= REF(VAR4,1);
RSA:SMA(MAX(VAR4-VAR5,0),2,1)/SMA(Abs(VAR4-VAR5),2,1)*100,LINETHICK2;
RSB:MA(RSA,10),COLOR00FFFF,LINETHICK2;
初升介入:IF(crOSS(RSA,RSB),50,0),STICK,LINETHICK2;
洗盘加仓:IF(CROSS(RSB,90),50,0),STICK,LINETHICK2;
DRAWTEXT(CROSS(RSA,RSB),0,'初升介入'),COLORBLUE;
DRAWTEXT(CROSS(RSB,90),0,'洗盘加仓'),COLOR00FFFF;
DRAWTEXT(CROSS(RSA,RSB),RSA*1.2,'▲'),COLORRED;
DRAWTEXT(CROSS(RSB,RSA),RSB*1.3,'▼'),COLORFF00FF;