零轴:50,Colorcccccc;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
Vara1:=LLV(LOW,8);
Vara2:=HHV(HIGH,8);
K1:=EMA((CLOSE-Vara1)/(Vara2-Vara1)*100,4);
D1:=EMA(0.667*REF(K1,1)+0.333*K1,2);
J1:=3*K1-2*D1;
a:=250;
DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
jh:=hhv(max(k1,max(d1,j1)),a);
jl:=llv(min(k1,min(d1,j1)),a);
dh:=hhv(max(DIFF,DEA),a);
dl:=llv(min(DIFF,DEA),a);
sh:=(jh-jl)/(dh-dl)/2;
DIFF50:=sh*DIFF+50;
DEA50:=sh*DEA+50;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,sh*MACD,4,0),color33FF33;
STICKLINE(MACD<ref(MACD,1)and MACD<0,0,sh*MACD,4,0),colorFFCC33;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,sh*MACD,4,0),COLORyellow;
STICKLINE(MACD>ref(MACD,1)and MACD>0,0,sh*MACD,4,0),ColorFF00FF;
STICKLINE(MACD>=0,79,80,5,0),COLORRED;
STICKLINE(MACD<0,79,80,5,1),COLOR33FF33;
STICKLINE(MACD>=0,19,20,5,0),COLORRED;
STICKLINE(MACD<0,19,20,5,1),COLOR33FF33;
STICKLINE(MACD>0,DIFF50,DEA50,7,1),COLORRED;
STICKLINE(MACD<0,DIFF50,DEA50,7,1),ColorFFFF00;
K:k1,colorwhite;
D:d1,coloryellow;
J:j1,ColorFF00FF;

:victory: :victory: :victory: