以下是通达信跟庄筹码系列-跟庄筹码MACD副图指标源码配图(无源码的请下载附件导入)
通达信跟庄筹码系列---跟庄筹码MACD副图指标
EMA1:=EMA(C,1);
EMA5:=EMA(C,5);
EMA10:=EMA(C,10);
EMA20:=EMA(C,20);
EMA30:=EMA(C,30);
EMA60:=EMA(C,60);
EMA120:=EMA(C,120);
均价线:=(EMA1+EMA5+EMA10+EMA20+EMA30+EMA60+EMA120)/7;
R:=(2*L+3*均价)/5;{最低价和均价的均值}
R1:=(2*H+3*均价)/5;
M3:=EMA((R+R1)/2,3);{指数的平均移动}
M5:=EMA((R+R1)/2,5);
M8:=EMA((R+R1)/2,8),COLORWHITE;
M13:=EMA((R+R1)/2,13);
M21:=EMA((R+R1)/2,21),COLORYELLOW;
M34:=EMA((R+R1)/2,34);
M55:=EMA((R+R1)/2,55);
黄金线:=EMA((M3+M5+M8+M13+M21+M34+M55)/7,(3+5+8+13+21+34+55)/7);{各指数
的平均移动的均值}
跟庄线:=EMA(LLV((R+R1)/2,2),3),COLORWHITE,LINETHICK1;
筹码:=(跟庄线-黄金线)/(COST(90)-COST(10))*100,COLOR00FFFF;
DIFF:EMA(筹码,9)-EMA(筹码,26);
DEA:EMA(DIFF,9);
MACD:=2*DIFF-2*DEA;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD,2,0),COLORLIRED;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),0,MACD,2,0),COLORRED;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),COLORBLUE;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),COLORLIBLUE;
646577349.jpg
64733517.jpg
|