D1:=20
D2:=60
D3:=120
MA1:MA(CLOSE,D1),COLORWHITE,DOTLINE;
MA2:MA(CLOSE,D2),COLORRED,DOTLINE;
MA3:MA(CLOSE,D3),COLORBLUE,DOTLINE;
EMA1:EMA(CLOSE,D1),COLORWHITE;
EMA2:EMA(CLOSE,D2),COLORRED;
EMA3:EMA(CLOSE,D3),COLORBLUE;
DRAWICON(CURRBARSCOUNT=D1+1,C,5);
DRAWICON(CURRBARSCOUNT=D2+1,C,5);
DRAWICON(CURRBARSCOUNT=D3+1,C,5);