MA1:EMA(CLOSE,P1);
MA2:EMA(CLOSE,P2);
MA3:EMA(CLOSE,P3);
MA4:EMA(CLOSE,P4);
DIFF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1:=EMA(DIFF1,9);
MACD:=2*(DIFF1-DEA1),COLORYELLOW,LINETHICK0;
MACDHS:=IF(MACD>0 AND MACD>=REF(MACD,1),MACD,0);
MACDHX:=IF(MACD>0 AND MACD<REF(MACD,1),MACD,0);
MACDLX:=IF(MACD<0 AND MACD<=REF(MACD,1),MACD,0);
MACDLS:=IF(MACD<0 AND MACD>REF(MACD,1),MACD,0);
AA:=STICKLINE( C<0,H*1.003,L*0.998,0,0),COLOR666666;
BB:=STICKLINE( C<0,O,C,2.95,1),COLOR666666;
STICKLINE(MACDHS>0,O,C,3.0,0),COLOR0000BB;
STICKLINE(MACDHS>0,O,C,2.7,0),COLOR0000CC;
STICKLINE(MACDHS>0,O,C,2.4,0),COLOR0011CC;
STICKLINE(MACDHS>0,O,C,2.0,0),COLOR1122DD;
STICKLINE(MACDHS>0,O,C,1.7,0),COLOR2233DD;
STICKLINE(MACDHS>0,O,C,1.3,0),COLOR3344EE;
STICKLINE(MACDHS>0,O,C,1,0),COLOR4455EE;
STICKLINE(MACDHS>0,O,C,0.6,0),COLOR5566FF;
STICKLINE(MACDHS>0,O,C,0.3,0),COLOR6677FF;
STICKLINE(MACDHS>0,H,L,0,0),COLOR6677FF;
STICKLINE(MACDHX>0,O,C,3,0),COLOR0077BB;
STICKLINE(MACDHX>0,O,C,2.6,0),COLOR0088CC;
STICKLINE(MACDHX>0,O,C,2.2,0),COLOR0099CC;
STICKLINE(MACDHX>0,O,C,1.8,0),COLOR00AADD;
STICKLINE(MACDHX>0,O,C,1.4,0),COLOR00BBDD;
STICKLINE(MACDHX>0,O,C,1,0),COLOR00CCEE;
STICKLINE(MACDHX>0,O,C,0.6,0),COLOR00DDEE;
STICKLINE(MACDHX>0,O,C,0.2,0),COLOR00EEFF;
STICKLINE(MACDHX>0,O,C,0.1,0),COLOR00FFFF;
STICKLINE(MACDHX>0,H,L,0,0),COLOR00FFFF;
STICKLINE(MACDLS<0,O,C,3,0),COLOR770000;
STICKLINE(MACDLS<0,O,C,2.7,0),COLOR881100;
STICKLINE(MACDLS<0,O,C,2.4,0),COLOR992200;
STICKLINE(MACDLS<0,O,C,2.1,0),COLORAA3300;
STICKLINE(MACDLS<0,O,C,1.7,0),COLORBB4400;
STICKLINE(MACDLS<0,O,C,1.4,0),COLORCC5500;
STICKLINE(MACDLS<0,O,C,1.1,0),COLORDD6600;
STICKLINE(MACDLS<0,O,C,0.8,0),COLOREE7700;
STICKLINE(MACDLS<0,O,C,0.4,0),COLORFF8800;
STICKLINE(MACDLS<0,H,L,0,0),COLORFF8800;
STICKLINE(MACDLX<0,O,C,3.0,0),COLOR005500;
STICKLINE(MACDLX<0,O,C,2.8,0),COLOR007700;
STICKLINE(MACDLX<0,O,C,2.4,0),COLOR009900;
STICKLINE(MACDLX<0,O,C,2.0,0),COLOR00AA00;
STICKLINE(MACDLX<0,O,C,1.6.5,0),COLOR00BB00;
STICKLINE(MACDLX<0,O,C,1.2,0),COLOR00CC00;
STICKLINE(MACDLX<0,O,C,1.0,0),COLOR00DD00;
STICKLINE(MACDLX<0,O,C,0.6,0),COLOR00EE00;
STICKLINE(MACDLX<0,O,C,0.2,0),COLOR00FF00;
STICKLINE(MACDLX<0,H,L,0,0),COLOR00FF00; |