LONG:=26;
SHORT:=12;
M:=9;N1:=6;N2:=12; N3:= 24; N:=3;
{DIFF:=(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG))*100;}
DIFF:=IF(V!=INDEXV,(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG))*100,
(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG))*1);
DEA:=EMA(DIFF,M);
MACD:=3*(DIFF-DEA);
A:=HHV(DIFF,300);
B:=MACD-REF(MACD,1);
D1:=REF(MACD,1)-REF(MACD,2);
STICKLINE(MACD>0 AND B>0,0,MACD,1,0)COLORRED;
STICKLINE(MACD>0 AND B