{MACD}
DIFF:EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:EMA(DIFF,9);
MACD:=(DIFF-DEA)*2;
{STICKLINE(C>0,0,0,0,1);}
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)C AND REF(“KDJ.K”(9,3,3),A2+1)C AND REF(“RSI.RSI1″(6,12,24),A3+1)0,-0.1,0),COLORRED{POINTDOT};
STICKLINE(B1>0,-0.3,0,2.5,1),COLORRED;
KDJ底背:IF(B2>0,-0.1,0),COLORFF00FF,{POINTDOT};
STICKLINE(B2>0,-0.3,0,2.5,1),COLORFF00FF;
RSI底背:IF(B3>0,-0.1,0),COLORYELLOW,{POINTDOT};
STICKLINE(B3>0,-0.3,0,2.5,1),COLORYELLOW;
MACD顶背:IF(D1>0,0.1,0),COLOR00FF00,{POINTDOT};
STICKLINE(D1>0,0.3,0,2.5,1),COLOR00FF00;
KDJ顶背:IF(D2>0,0.1,0),COLORFFCC66,{POINTDOT};
STICKLINE(D2>0,0.3,0,2.5,1),COLORFFCC66;
RSI顶背:IF(D3>0,0.1,0),COLORWHITE,{POINTDOT};
STICKLINE(D3>0,0.3,0,2.5,1),COLORWHITE;
{画零轴上下线}
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLOR0000CC;
STICKLINE(MACD>=0 AND MACDMA(DEA,2),DEA,DRAWNULL),COLORMAGENTA;
{标注斐波那契数字}
TJ:=MACD>0;
T:=MACD
【股票入门基础知识】【通达信】优化MACD结合斐波那契指标公式
特别声明:文章内容仅供参考,不造成任何投资建议。投资者据此操作,风险自担。