DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MACD : 2*(DIFF-DEA);
STICKLINE(MACD》0,MACD,0,0.5,1),COLORRED;
STICKLINE(MACD《0,MACD,0,0.5,1),COLORGREEN;
STICKLINE(MACD》0 AND MACD
STICKLINE(MACD《0 AND MACD》REF(MACD,1),MACD,0,0.5,1),COLORFF00FF;
綠柱面積:IF (MACD《0,SUM(MACD,BARSLAST(MACD》0)),0),nodraw,colorgreen;
紅柱面積:IF (MACD》0,SUM(MACD,BARSLAST(MACD《0)),0),nodraw,Colorred;
DRAWTEXT(CROSS(diff,80),diff,‘強’),COLORRED;
DRAWTEXT(CROSS(-80,diff),diff,‘弱’),COLORGREEN;
DRAWTEXT(CROSS(diff,-80),diff,‘強’),COLORRED;
DRAWTEXT(CROSS(80,diff),diff,‘弱’),COLORGREEN;
DRAWTEXT(CROSS(diff,30),diff,‘強’),COLORRED;
DRAWTEXT(CROSS(-30,diff),diff,‘弱’),COLORGREEN;
DRAWTEXT(CROSS(diff,-30),diff,‘強’),COLORRED;
DRAWTEXT(CROSS(30,diff),diff,‘弱’),COLORGREEN;
DRAWTEXT(CROSS(diff,50),diff,‘強’),COLORRED;
DRAWTEXT(CROSS(-50,diff),diff,‘弱’),COLORGREEN;
DRAWTEXT(CROSS(diff,-50),diff,‘強’),COLORRED;
DRAWTEXT(CROSS(50,diff),diff,‘弱’),COLORGREEN;
(南方財富網(wǎng)SOUTHMONEY.COM)