以下是通达信跟庄系列---跟庄筹码MACD副图指标源码和截图
通达信跟庄筹码系列---跟庄筹码MACD副图指标源码:
生命线:EMA(CLOSE,60)+EMA(CLOSE,90)/2,LINETHICK2,COLORCC33FF;
庄心电:EMA(CLOSE,21)-1+EMA(VOL,5)/EMA(VOL,40),,COLORGRAY;
跟庄仙:ZIG(3,19),LINETHICK1,COLORGREEN;
DRAWTEXT(CROSS(REF(ZIG(3,19),1),ZIG(3,19)),HIGH*1.01,'庄出'),,COLORYELLOW;
DRAWTEXT(CROSS(ZIG(3,19),REF(ZIG(3,19),1)),LOW*0.99,'庄吸'),,COLORRED;
VAR3:=HHVBARS(ZIG(3,19) REF(ZIG(3,19),1)ANDREF(ZIG(3,19),1) REF(ZIG(3,19),2),0);
时间之窗:STICKLINE(VAR3=2,L*0.95,L*0.98,12,0),COLOR0000FF;
STICKLINE(VAR3=4,H*1.05,H*1.02,12,0),COLOR9966FF;
STICKLINE(VAR3=7,L*0.95,L*0.98,12,0),COLOR00FFFF;
STICKLINE(VAR3=12,H*1.05,H*1.02,12,0),COLORFF33FF;
STICKLINE(VAR3=20,L*0.95,L*0.98,12,0),COLOR0066FF;
STICKLINE(VAR3=33,H*1.05,H*1.02,12,0),COLORFFFF00;
STICKLINE(VAR3=54,L*0.95,L*0.98,12,0),COLOR006600;
STICKLINE(VAR3=88,H*1.05,H*1.02,12,0),COLOR00FF00;
STICKLINE(VAR3=143,L*0.95,L*0.98,12,0),COLORCCFFFF;
STICKLINE(VAR3=232,H*1.05,H*1.02,12,0),COLORFF0033;
STICKLINE(VAR3=376,L*0.95,L*0.98,12,0),COLORFF9966;
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 0ANDMACD REF(MACD,1),0,MACD,2,0),COLORLIRED;
STICKLINE(MACD 0ANDMACD REF(MACD,1),0,MACD,2,0),COLORRED;
STICKLINE(MACD 0ANDMACD REF(MACD,1),0,MACD,2,0),COLORBLUE;
STICKLINE(MACD 0ANDMACD REF(MACD,1),0,MACD,2,0),COLORLIBLUE;
买点:(LLV(L,6)=LLV(L,14)ANDREF(HHV(H,14),1)=REF(HHV(H,20),1)
ANDcrOSS(C,REF(HHV(C,14),1)))OR(REF(HHV(H,5),1)=REF(HHV(H,9),1)
ANDCROSS(C,REF(HHV(C,5),1))ANDL REF(L,1)ANDREF(LLV(L,2),1)=LLV(L,20))
OR(REF(HHV(H,16),1)=REF(HHV(H,22),1)ANDCROSS(C,REF(HHV(C,16),1))
ANDL REF(L,1)ANDREF(LLV(L,6),1)=LLV(L,20))COLORmaGENTA;
通达信跟庄筹码系列---跟庄筹码MACD副图指标截图