内部MACD-精品通达信指标公式源码分享
XA_1:=(EXPMA(CLOSE,30)-REF(EXPMA(CLOSE,30),1))/REF(EXPMA(CLOSE,30),1)*100;
DRAWBAND(EMA(SUM(XA_1,2),5),RGB(120,0,0),MA(EMA(SUM(XA_1,2),5),5),RGB(0,0,200));
STICKLINE(XA_1<REF(XA_1,1) AND XA_1>0,0,XA_1,3,0),COLOR00AAFF;
STICKLINE(XA_1<REF(XA_1,1) AND XA_1>0,0,XA_1,2.2,0),COLOR00BBFF;
STICKLINE(XA_1<REF(XA_1,1) AND XA_1>0,0,XA_1,1.8,0),COLOR00CCFF;
STICKLINE(XA_1<REF(XA_1,1) AND XA_1>0,0,XA_1,1.3,0),COLOR00DDFF;
STICKLINE(XA_1<REF(XA_1,1) AND XA_1>0,0,XA_1,0.9,0),COLOR00EEFF;
STICKLINE(XA_1<REF(XA_1,1) AND XA_1>0,0,XA_1,0.5,0),COLORYELLOW;
STICKLINE(XA_1>=REF(XA_1,1) AND XA_1>0,0,XA_1,3,0),COLOR0000AA;
STICKLINE(XA_1>=REF(XA_1,1) AND XA_1>0,0,XA_1,3,0),COLOR0011BB;
STICKLINE(XA_1>=REF(XA_1,1) AND XA_1>0,0,XA_1,2.2,0),COLOR0022CC;
STICKLINE(XA_1>=REF(XA_1,1) AND XA_1>0,0,XA_1,1.65,0),COLOR0033DD;
STICKLINE(XA_1>=REF(XA_1,1) AND XA_1>0,0,XA_1,1.1,0),COLOR0044EE;
STICKLINE(XA_1>=REF(XA_1,1) AND XA_1>0,0,XA_1,0.55,0),COLOR0055FF;
STICKLINE(XA_1>REF(XA_1,1) AND XA_1<0,0,XA_1,3,0),COLORAA00BB;
STICKLINE(XA_1>REF(XA_1,1) AND XA_1<0,0,XA_1,3,0),COLORBB11BB;
STICKLINE(XA_1>REF(XA_1,1) AND XA_1<0,0,XA_1,2.2,0),COLORCC22BB;
STICKLINE(XA_1>REF(XA_1,1) AND XA_1<0,0,XA_1,1.65,0),COLORDD33BB;
STICKLINE(XA_1>REF(XA_1,1) AND XA_1<0,0,XA_1,1.1,0),COLOREE44BB;
STICKLINE(XA_1>REF(XA_1,1) AND XA_1<0,0,XA_1,0.55,0),COLORFF55BB;
STICKLINE(XA_1<=REF(XA_1,1) AND XA_1<0,0,XA_1,3,0),COLORFFAA00;
STICKLINE(XA_1<=REF(XA_1,1) AND XA_1<0,0,XA_1,3,0),COLORFFBB11;
STICKLINE(XA_1<=REF(XA_1,1) AND XA_1<0,0,XA_1,2.2,0),COLORFFCC22;
STICKLINE(XA_1<=REF(XA_1,1) AND XA_1<0,0,XA_1,1.65,0),COLORFFDD33;
STICKLINE(XA_1<=REF(XA_1,1) AND XA_1<0,0,XA_1,1.1,0),COLORFFEE44;
STICKLINE(XA_1<=REF(XA_1,1) AND XA_1<0,0,XA_1,0.55,0),COLORFFFF55;
DIF2:EMA(SUM(XA_1,2),5),COLORYELLOW,LINETHICK2;
入1:IF(DIF2>REF(DIF2,1),DIF2,DRAWNULL),COLORRED,LINETHICK2;
入2:IF(DIF2<REF(DIF2,1),DIF2,DRAWNULL),COLORGREEN,LINETHICK2;
DEA2:MA(DIF2,5),COLORWHITE;
XA_2:=(EXPMA(CLOSE,30)-REF(EXPMA(CLOSE,30),1))/REF(EXPMA(CLOSE,30),1)*100;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!