A:=EMA(CLOSE,17);
T:=EMA(CLOSE,8);
B:=EMA(A,9);
T1:=EMA(T,9);
DEA:=EMA(T-(T1-T),2),COLORFF8866,LINETHICK2;
DIFF:=DEA-EMA(((A-B)-(T-T1)),1)*6,COLORFFFF66,LINETHICK2;
WC:=sma((2*CLOSE+HIGH+LOW)/4,3,1);
DPO: 2*WC-REF(MA(WC,20),20/2+1);
MADPO: MA(DPO,10);
VAR1:= HHV(MADPO,18);
VAR2:= LLV(MADPO,53);
VAR3:= MADPO-(DPO-MADPO);
UP: IF(DPO VAR1 AND MADPO=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORbb8a00,LINETHICK2;
DN: IF(DPO VAR2 AND MADPO=VAR2,MIN(HHV(VAR2,10),VAR3),VAR2),COLORbb8a00,LINETHICK2;