通达信量价精细解盘源码附图

[复制链接]
查看219 | 回复0 | 2021-8-20 19:51:55 | 显示全部楼层 |阅读模式

以下是通达信量价精细解盘源码附图(无源码的请下载附件导入)

(自编倍量柱解盘+非常棒+底部趋势拐点+立桩量)

1.画倍量黄金柱标识--红箭头图标,前3天K线既为倍量黄金柱。

2.画梯量黄金柱标识--橘子图标。

3.画平量黄金柱标识--苹果图标。

4.画立桩量标识    --顶部双红箭头图标。

K线标识:

(1)、主图主要就是常用的均线图,红色实体K线代表当日上涨大于3%的K线,白色实体K线代表当日涨停K线,绿色实体K线代表当日跌幅大于3%的K线,蓝色实体K线代表当日跌停K线。

(2)、量柱图,黄色柱是倍量柱,白色柱是平量柱,绿色柱是21日内的低量柱,洋红色柱是55日内的低量柱。

优化后的公式解决了高位放巨量形成假五星上将柱的问题。

另外加上一条,最好是选首次涨停并出现五星上将柱的股,大家可以观察放量后的买点及真假!

DRAWTEXT(C/REF(C,1)>1.099,L*0.96,' 涨停') ,COLORRED;

出:=FILTER(COUNT(C<O,2)=2 AND L<REF(C,1),5);

DRAWTEXT(出,H,'出'),COLORGREEN;

{DRAWKLINE(H,O,L,C);}

黄金柱:=V/REF(V,1)>=2.0;

K1:=SUMBARS(黄金柱,1) ;

K2:=SUMBARS(黄金柱,2);

K3:=SUMBARS(黄金柱,3);

K4:=SUMBARS(黄金柱,4);

K5:=SUMBARS(黄金柱,5);

K6:=SUMBARS(黄金柱,6);

K7:=SUMBARS(黄金柱,7);

K8:=SUMBARS(黄金柱,8);

K9:=SUMBARS(黄金柱,9);

K10:=SUMBARS(黄金柱,10);

AA:STICKLINE(K1,REF(L,K1-1)*1.002,REF(L,K1-1),1,0),COLORYELLOW;

 

{预定黄金柱}

{预定黄金柱:=REF(V,2)>=REF(V,3)*1.99 AND REF(C,2)>REF(O,2)

    AND REF(V,2)=HHV(V,3) AND C/REF(C,2) >=1.0995 AND REF(L,2)=LLV(L,3);}

{预定:STICKLINE(预定黄金柱,H,H,30,0),COLORRED;}

{DRAWICON(预定黄金柱,H,19);}

 

{将军柱中的五星上将黄金柱}

T60:=V=HHV(V,60);

T100:=V=HHV(V,100);

T2:=V/REF(VOL,1)>=3;

T3:=REF(C,1)/REF( O,1)<3;

五星上将:=(T60 AND T2 AND T3) OR (T100 AND T2 AND T3);

DRAWICON(五星上将,H,23);

 

{量柱图}

 

{MA13:MA(CLOSE,13),COLORWHITE;

MA34:MA(CLOSE,34),COLORYELLOW;

MA55:MA(CLOSE,55),COLOR9933FF;}

 

{MA4:MA(CLOSE,4),COLORWHITE;

MA10:MA(CLOSE,10),COLORYELLOW;

MA20:MA(CLOSE,20),COLOR9933FF;

MA30:MA(CLOSE,30),COLORLIBLUE;

MA60:MA(CLOSE,60),COLORWHITE;

MA120:MA(CLOSE,120),COLORLIGREEN;}

TY:=C;

AA1:=REF(TY,10)=HHV(TY,2*10+1); BB1:=FILTER(AA1,10); C1:=BACKSET(BB1,10+1); HD:=FILTER(C1,10);

AA2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(AA2,10); CC2:=BACKSET(B2,10+1); LD:=FILTER(CC2,10);

前期高位:REF(C,BARSLAST(HD)),COLORBLUE,COLORMAGENTA;

STICKLINE(C,前期高位,前期高位,8,0),COLORMAGENTA;

前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,LINETHICK1,COLORGREEN;

 

{求位置坐标}

PHD:=IF(LLV(L,3)>=REF(H,3),REF(H,3),

       IF((LLV(L,3)>=REF(C,3) AND REF(C,3)>REF(O,3)),REF(C,3),

          IF(LLV(L,3)>=REF(O,3) AND REF(C,3)>REF(O,3),REF(O,3),REF(L,3))));

{自动画量能平台}

{NN 1  300  21}

{NN:=21;

TTJ:=BARSLAST(REF(倍量黄金柱,NN-1));

K0:=TTJ=0;

K1:=SUMBARS(K0,1);

K2:=SUMBARS(K0,2);

K3:=SUMBARS(K0,3);

K4:=SUMBARS(K0,4);

K5:=SUMBARS(K0,5);

K6:=SUMBARS(K0,6);

K7:=SUMBARS(K0,7);

K8:=SUMBARS(K0,8);

K9:=SUMBARS(K0,9);

K10:=SUMBARS(K0,10);

CCCC1:=REF(C,K1-1);}

{在K线图上标示量柱类型}

倍量:=DRAWICON((VOL>REF(V,1)*2.0 OR VOL=REF(V,1)*2.0) AND C>REF(C,1),H+0.2,26);

低量:=DRAWICON(VOL<REF(LLV(VOL,13),1),H+0.1,2);

地量:=DRAWICON(VOL<REF(LLV(VOL,100),1),H+0.1,12);

平量:=DRAWICON(ABS(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5)<=0.03 OR ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.03,H+0.1,16);

倍缩:=DRAWICON(VOL<=REF(V,1)*0.5,H+0.1,27);

{画量柱标识:}

{1.画倍量黄金柱标识--红箭头图标}

倍量黄金柱:=DRAWICON((LLV(L,3)>REF(L,3) OR LLV(L,3)=REF(L,3)) AND HHV(V,3)<REF(V,3) AND

REF(C,3)>REF(O,3) AND REF(V,3)>=2*REF(V,4),H+0.2,1);

{2.画梯量黄金柱标识--橘子图标}

梯量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) AND

REF(V,5)>REF(V,6) AND REF(V,4)>REF(V,5) AND REF(V,3)>REF(V,4),H,17);

{3.画平量黄金柱标识--苹果图标}

平量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) AND

REF(C,3)>REF(O,3) AND ABS(REF(V,3)-REF(V,4))/REF(V,4)<=0.03,H,19);

 

{4.画立桩量标识--顶部红箭头图标}

N:=25;

立桩量:=REF(V,3)/REF(MA(V,5),4)>(N/10) AND

REF(V,3)/REF(HHV(V,60),4)>1.5 AND LLV(L,3)>REF(L,3);

 

STICKLINE(倍量,OPEN,CLOSE,-1,0),COLORYELLOW;

倍量黄金线:STICKLINE(倍量黄金柱,PHD,PHD,30,0),COLORWHITE;

DRAWICON(倍量黄金柱,PHD*1.008,12);

DRAWTEXT(倍量黄金柱,PHD*1.010,' 复合线'),COLORFF00FF;

DRAWTEXT(倍量黄金柱,PHD,'-------------'),COLORWHITE;

 

{平量黄金线:STICKLINE(平量黄金柱,PHD*1.002,PHD,100,0),COLORYELLOW;

DRAWTEXT(平量黄金柱,PHD*1.015,'平量黄金线'),COLORLIGREEN ;

梯量黄金线:STICKLINE(梯量黄金柱,PHD*1.002,PHD,100,0),COLORYELLOW;

DRAWTEXT(梯量黄金柱,PHD*1.015,'梯量黄金线'),COLORFF00FF ;}

 

立桩量标识RAWICON(立桩量,H*1.002,1);

DRAWTEXT(立桩量,H*1.06,''),COLORFFFF00;

DRAWTEXT(立桩量,H*1.04,'立'),COLORFFFF00;

DRAWTEXT(立桩量,H*1.02,'桩'),COLORFFFF00;

{DA:STICKLINE(K4<=30,REF(C,K4-1)*1.002,REF(C,K4-1),10,0),COLORBLUE;

EA:STICKLINE(K5<=30,REF(C,K5-1)*1.002,REF(C,K5-1),10,0),COLORBLUE;

FA:STICKLINE(K6<=30,REF(C,K6-1)*1.002,REF(C,K6-1),10,0),COLORBLUE;

GA:STICKLINE(K7<=30,REF(C,K7-1)*1.002,REF(C,K7-1),10,0),COLORBLUE;

HA:STICKLINE(K8<=30,REF(C,K8-1)*1.002,REF(C,K8-1),10,0),COLORBLUE;

IA:STICKLINE(K9<=30,REF(C,K9-1)*1.002,REF(C,K9-1),10,0),COLORBLUE;

JA:STICKLINE(K10<=30,REF(C,K10-1)*1.002,REF(C,K10-1),10,0),COLORBLUE;

}

 

{底部趋势拐点}

VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);

 

VOLUME:=VOL;

 

AAG:=VOL>=REF(V,1)*1.91 AND C>REF(C,1);

AA1G:=VOL<REF(LLV(VOL,21),1);

AA2G:=VOL<REF(LLV(VOL,55),1);

AA3G:=ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.05;

 

MAVOL5:=MA(VOLUME,M1);

MAVOL35:=MA(VOLUME,M2);

MAVOL135:=MA(VOLUME,M3);

VOLUME5:=MA(VOLUME,M1);

VOLUME35:=MA(VOLUME,M2);

VOLUME135:=MA(VOLUME,M3);

 

买入:=CROSS(VOLUME5,VOLUME135);

DRAWICON(买入,L,9);

买入1:=CROSS(VOLUME35,VOLUME135);

DRAWICON(买入1,L,5);

买入2:=CROSS(VOLUME5,VOLUME35);

DRAWICON(买入2,L,1);

{非常棒}

EMA13:=EMA(C,13),COLORWHITE;

EMA21:=EMA(C,21),COLORYELLOW;

EMA34:=EMA(C,34),COLORFF00FF;

EMA60:=MA(C,60),COLORFFCC66;

VAR2:=(2*CLOSE+HIGH+LOW)/4;

VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);

VAR4:=LLV(LOW,5); VAR5:=HHV(HIGH,4);

散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;

庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;

DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←买'),COLORLIRED;

DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←抛'),COLORGREEN;

DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);

DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);

VAR9:=CLOSE-REF(CLOSE,5);

VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);

VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);

卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);

DRAWICON(卖出<0,H+0.05,2);

买线:=EMA(CLOSE,2);

卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);

B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;

S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;

VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;

S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;

A0:=(L+H+C*2)/4;

A1B:EMA(A0,14),COLORBLUE,LINETHICK2;

A2B:=EMA(A0,25),COLORLIBLUE,LINETHICK2;

A1X:=(A1B-REF(A1B,1))/REF(A1B,1)*100,NODRAW;

A2X:=(A2B-REF(A2B,1))/REF(A2B,1)*100,NODRAW;

看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),COLORMAGENTA{,LINETHICK2};

逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),COLORCYAN,{LINETHICK2};

买入持股:IF(A1X>=0,A1B,DRAWNULL)COLORRED,LINETHICK3;

卖出空仓:IF(A1X<0 AND A2X<0,A1B,DRAWNULL)COLORGREEN,LINETHICK3;

{STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;

STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;

STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;

STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;};
 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则