通达信资金MACD+梁队长选股主图/副图指标
DRAWGBK(C>0,RGB(8,10,4),RGB(8,10,4),0,'',0);
{资金主图显示}
D顶:=REFDATE(HHV(H,120),DATE);
D底:=REFDATE(LLV(L,120),DATE);
JGV:=(L2_VOL(0,0) - L2_VOL(0,1))*AMOUNT;
SHV:=(L2_VOL(3,0) - L2_VOL(3,1))*AMOUNT;
机构资金:=EMA(JGV,60)/CAPITAL,COLORMAGENTA;
散户资金:=EMA(SHV,60)/CAPITAL,COLORGREEN;
买入:=机构资金-散户资金;
累计:=EMA(买入,1),NODRAW;
均值:=EMA(累计,MIN(10,10)),NODRAW;
STICKLINE(累计>0,D顶,D底,5,0),COLOR1B0E8B;
STICKLINE(累计<0,D顶,D底,5,0),COLOR6B6B12;
{MACD主图显示}
高1:=REF(HHV(H,120),3);
低1:=REF(LLV(L,120),3);
H3:=高1-(高1-低1)*0.5;
中轴:REFDATE(H3,DATE),POINTDOT,COLORLIGRAY;
B1:=EMA(C,12);
B2:=EMA(C,26);
B3:=(B1-B2)*2;
WDIF:中轴+B3;
WDEA:EMA(WDIF,9);
DRAWBAND(WDIF,RGB(110,0,0),WDEA,RGB(0,80,0));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
MACD:=2*(WDIF-WDEA)LINETHICK2;
STICKLINE(MACD>0,中轴,中轴+MACD,0,1),COLORRED;
STICKLINE(MACD<0,中轴,中轴+MACD,0,1),COLORLIBLUE;
A1:=BARSLAST(REF(CROSS(WDIF,WDEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND WDIF>REF(WDIF,A1+1) AND CROSS(WDIF,WDEA);
底背:DRAWLINE(A1=0,WDEA,底背离,WDEA,0),COLORRED,LINETHICK4;
A2:=BARSLAST(REF(CROSS(WDEA,WDIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(WDIF,A2+1)>WDIF AND CROSS(WDEA,WDIF);
顶背:DRAWLINE(A2=0,WDEA,顶背离,WDEA,0),COLORGREEN,LINETHICK4;
A:=REF(HY_INDEXC,1);
行业涨幅:IF(A>0,(HY_INDEXC-A)*100/A,0),NODRAW,COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK),COLOR00C0C0;
{BBI牛熊均线}
BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4 COLORGREEN LINETHICK2;
BBI操作线:IF(BBI>REF(BBI,1),BBI,DRAWNULL),LINETHICK2,COLORMAGENTA;
{慢牛线}
VAR1:=(3*C+O+H+L)/6;
慢牛线:EMA(3*VAR1-2*SMA(VAR1,2,1),8),COLORBLUE,LINETHICK2;
慢牛走牛:IF(慢牛线>REF(慢牛线,1),慢牛线,DRAWNULL),LINETHICK2,COLORYELLOW;
{慢牛买点}
慢牛B点:=C>=慢牛线 AND REF(C,1)<REF(慢牛线,1) AND 慢牛线>REF(慢牛线,1);
DRAWICON(C>=慢牛线 AND REF(C,1)<REF(慢牛线,1) AND 慢牛线>REF(慢牛线,1),L*0.98,7);
{【参数定义】}
RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
K1:=SMA(RSV,10,1);
D1:=SMA(K1,5,1);
KK:=INTPART(K1);
DD0:=INTPART(D1);
TFXXS:=KK+DD0;
TGLXS:=(TFXXS-REF(TFXXS,1))*10;
乖离系数:TGLXS,COLORGREEN,NODRAW;
ZLCM:=EMA(WINNER(CLOSE)*70,3);
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);
ZZLKP:=ZLCM/(ZLCM+SHCM)*100;
控盘系数:INTPART(ZZLKP),COLORCYAN,NODRAW;
风险系数:TFXXS,LINETHICK2,COLORYELLOW,NODRAW;
选股:=控盘系数>19 AND 乖离系数>39 AND 风险系数<110;
DRAWTEXT(选股>0,LOW*0.98,'☆'),COLORDD00DD;
净流比:=(LARGEINTRDVOL/LARGEOUTTRDVOL);
大10追:=EMA(净流比,10)*10;
买力度:=LARGEINTRDVOL*100/VOL;
强势将到:=选股 AND 大10追>10 AND 净流比>1 AND 买力度>30;
DRAWTEXT(强势将到,L*0.992,'强势将到'),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0,0.92,0,' 1、乖离系数,大于40关注 小于-50坚决不进场 ,大于60坚决买入,买入时看股价运行的情况而定。
2、控盘系数大于20 可以做个小波段 准确率80%。')COLOR4080FF;
{倍量}
V2V:=V/REF(V,1)>=1.9 AND (IF(C<O,C>REF(C,1),1));
{金黄色}
DRAWTEXT(V2V,(L*0.99),'倍'),COLORYELLOW;
STICKLINE(V2V,OPEN,CLOSE,0,0),COLOR000DDD;
STICKLINE(V2V,OPEN,CLOSE,3.2,0),COLOR003333;
STICKLINE(V2V,OPEN,CLOSE,2.7,0),COLOR005555;
STICKLINE(V2V,OPEN,CLOSE,2.1,0),COLOR007777;
STICKLINE(V2V,OPEN,CLOSE,1.5,0),COLOR009999;
STICKLINE(V2V,OPEN,CLOSE,0.9,0),COLOR00BBBB;
STICKLINE(V2V,OPEN,CLOSE,0.3,0 ),COLOR00DDDD;
{涨停变色}
ZT:=C/REF(C,1)>1.097;
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
CZ:=REF(H,BH)-REF(L,BH);
STICKLINE(C,(REF(L,BH)+CZ*0.5),(REF(L,BH)+CZ*0.5),3,0),COLORRED;
STICKLINE(C,REF(L,BH),REF(L,BH),3,0),COLORBLUE;
STICKLINE(ZT,REF(O,BH),REF(C,BH),3,0),COLORYELLOW;
DRAWTEXT(ZT,L*0.97,'涨停'),COLORRED;
STICKLINE(ZT,LOW,HIGH,0.1,0),COLORRED;
STICKLINE(ZT,OPEN,CLOSE,0,0),COLORRED;
STICKLINE(ZT,CLOSE,OPEN,3,0) ,COLOR000066;
STICKLINE(ZT,CLOSE,OPEN,2.6,0) ,COLOR000088;
STICKLINE(ZT,CLOSE,OPEN,2.1,0) ,COLOR0000AA;
STICKLINE(ZT,CLOSE,OPEN,1.5,0) ,COLOR0000BB;
STICKLINE(ZT,CLOSE,OPEN,0.9,0) ,COLOR0000CC;
STICKLINE(ZT,CLOSE,OPEN,0.6,0) ,COLOR0000DD;
STICKLINE(ZT,CLOSE,OPEN,0.3,0) ,COLOR0000EE;
STICKLINE(ZT,CLOSE,OPEN,0.1,0) ,COLOR0000FF;
STICKLINE(ZT,CLOSE,OPEN,0,0) ,COLOR0000FF;{☆精确风险}
{相对低点K线变色,上穿写短线}
LC:=REF(C,1),LINETHICK0;
RSI:=((SMA(MAX((C-LC),0),13,1)/SMA(ABS((C-LC)),13,1))*100);
STICKLINE((RSI<20),L,H,0.1,0),COLORFF6600;
STICKLINE((RSI<20),O,C,4,0),COLORCC5000;
DRAWTEXT(CROSS(RSI,20-0.0005),H*1.01,'短线'),COLORAA99AA;
STICKLINE(CROSS(RSI,20-0.0005),C,O,3,0),COLOR888888;
STICKLINE(CROSS(RSI,20-0.0005),C,O,2,0),COLORAAAAAA;
STICKLINE(CROSS(RSI,20-0.0005),C,O,1,0),COLORCCCCCC;
STICKLINE(CROSS(RSI,20-0.0005),C,O,0.1,0),COLORFFFFFF;
STICKLINE(CROSS(RSI,20-0.0005),L,H,0,0),COLORFFFFFF;
- 上一篇公式:通达信短买副图/选股公式比较适合今买明卖源码
- 下一篇公式:通达信操盘提示(底部上升+主力拉升)两信号做成的选股公式