N=13,M=5,参数可调。
{量能饱和度}
SAT:=(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N));
饱和度:IF(SAT>1,1,SAT)*100,COLORLIGRAY,LINETHICK1,STICK;
LC:=REF(CLOSE,1);
品种:=SMA(MAX(CLOSE-LC,0),N,1)/SMA(Abs(CLOSE-LC),N,1)*100;
IC:=REF(INDEXC,1);
指数:=SMA(MAX(INDEXC-IC,0),N,1)/SMA(ABS(INDEXC-IC),N,1)*100;
相对强弱度:=(品种-指数)+50;
STICKLINE(相对强弱度<=50,50,相对强弱度,1,0),COLORGREEN;
STICKLINE(相对强弱度>=50,50,相对强弱度,1,0),COLORMAGENTA;
品种强弱:品种,COLORLIGREEN,LINETHICK3;
指数强弱:指数,COLORYELLOW,LINETHICK2;
IF(品种强弱>指数强弱,品种强弱,DRAWNULL),COLORRED,LINETHICK3;