P:=15;
S:=3;
M:=2;
DIFF:EMA(C,S)-EMA(C,P),COLORWHITE,NODRAW;
DEA:EMA(DIFF,M),COLORBLUE,NODRAW;
MACD:2*(DIFF-DEA),NODRAW;
STICKLINE1(DEA<=REF(DEA,1) AND DEA>0,0,DEA,3,1 ),COLORFF00FF;
STICKLINE1(DEA>REF(DEA,1) AND DEA>0,0,DEA,3.0,1 ),COLORFFFF00;
STICKLINE1(DEA>REF(DEA,1) AND DEA<=0,0,DEA,3.0,1),COLOR800080;
STICKLINE1(DEA<=REF(DEA,1) AND DEA<=0,0,DEA,3.0,1 ),COLOR00FFFF;
QIFF : EMA(CLOSE,9) – EMA(CLOSE,20),COLORFFFFFF,LINETHICK2;
DRAWCOLORLINE(QIFF>REF(QIFF,1),QIFF,COLORRED,COLORFFFFFF),LINETHICK2;
QEA : EMA(QIFF,9),COLORFFFFFF,LINETHICK2;
DRAWCOLORLINE(QEA>REF(QEA,1),QEA,COLORRED,COLORFFFFFF),LINETHICK2;
0;
DIFIF1:=EMA(C,9)-EMA(C,20);
OBV:=DIFIF1;
PZ:=3;
AA1:=REF(OBV,PZ)=HHV(OBV,2*PZ+1);
B1:=FILTER(AA1,PZ);
C1:=BACKSET(B1,PZ+1);
D1:=FILTER(C1,PZ);
AA2:=REF(OBV,PZ)=LLV(OBV,2*PZ+1);
B2:=FILTER(AA2,PZ);
C2:=BACKSET(B2,PZ+1);
D2:=FILTER(C2,PZ);
DRAWICON(D1,OBV,'ICO135');
DRAWICON(D2,OBV,'ICO134');