VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR2:=SMA(VAR1,3,1);
VAR3:=SMA(VAR2,3,1);
VAR4:=3*VAR2-2*VAR3;
VAR7:=MACD.DIF(26,12,9);
VAR8:=MACD.DEA(26,12,9);
KD王:COUNT(CROSS(VAR2,VAR3) AND CROSS(VAR4,VAR3),2)>=1,COLORWHITE,NODRAW;
MACD王:COUNT(CROSS(VAR7,VAR8) AND VAR7>VAR8,2)>=1,COLORYELLOW,NODRAW;
价王:COUNT(CROSS(MA(C,5),MA(C,10)) OR CROSS(MA(C,10),MA(C,20)),2)>=1,COLORMAGENTA,NODRAW;
量王:COUNT(CROSS(MA(VOL,5),MA(VOL,10)),2)>=1,COLORGREEN,NODRAW;
四大天王:KD王 AND MACD王 AND 价王 AND 量王,COLORRED,NODRAW;
DRAWTEXT_FIX(C>O,0,0.2,0,'分析家公式网'),COLOR666666;
STICKLINE(KD王,0,0.25,2,0),COLORWHITE,LINETHICK2;
STICKLINE(MACD王,0.25,0.5,2,0),COLORYELLOW,LINETHICK2;
STICKLINE(价王,0.5,0.75,2,0),COLORMAGENTA,LINETHICK2;
STICKLINE(量王,0.75,1,2,0),COLORGREEN,LINETHICK2;
STICKLINE(四大天王,0,1,2,0),COLORRED,LINETHICK2;