加入收藏
 

通达信指标 源码分享 缠论三类买卖

2018-07-26 09:22:55推荐星级:下载统计()
奇爱股票网提供通达信指标 源码分享 缠论三类买卖下载,更多精品通达信 大智慧 同花顺 飞狐股票公式 常用股票软件下载请登录www.72gu.com下载!
0
返回首页下载特效 需要: 积分

通达信指标 源码分享 缠论三类买卖说明

NOW_TIME:=TDXDLL1(100,DATE+19000000,L,C);
BAOHAN_KX:=TDXDLL1(1,H,L,C); {解决包含K线的问题};
FENXIN_KX:=TDXDLL1(2,PARA,L,C); {划分分型};
BI_KIND:=TDXDLL1(3,H,L,C); {笔是顶还是底};
BI_VALUE:=TDXDLL1(4,H,L,C); {笔的值};

BIZS_INIT:=TDXDLL1(9,H,L,C); {初始化笔中枢,重要}
BIZS_HEAD:=TDXDLL1(10,H,L,C); {笔中枢头}
BIZS_TAIL:=TDXDLL1(11,H,L,C); {笔中枢尾}
BIZS_ZGH:=TDXDLL1(12,H,L,C); {笔中枢ZGH}
BIZS_ZDH:=TDXDLL1(13,H,L,C); {笔中枢ZDH}
BIZS_ZGT:=TDXDLL1(14,H,L,C); {笔中枢ZGT}
BIZS_ZDT:=TDXDLL1(15,H,L,C); {笔中枢ZDT}
BIZS_H_DIR:=TDXDLL1(16,H,L,C); {笔中枢头方向}
BIZS_T_DIR:=TDXDLL1(17,H,L,C); {笔中枢尾方向}

GET_CV:=TDXDLL1(23,H,L,V); {得到CLOSE和VOL}
BI_ENERGY:=TDXDLL1(24,H,L,V); {得到CLOSE和VOL}

BIZS_INIT_L2:=TDXDLL1(209,H,L,C); {初始化笔中枢,重要}
BIZS_HEAD_L2:=TDXDLL1(210,H,L,C); {笔中枢头}
BIZS_TAIL_L2:=TDXDLL1(211,H,L,C); {笔中枢尾}
BIZS_ZGH_L2:=TDXDLL1(212,H,L,C); {笔中枢ZGH}
BIZS_ZDH_L2:=TDXDLL1(213,H,L,C); {笔中枢ZDH}
BIZS_ZGT_L2:=TDXDLL1(214,H,L,C); {笔中枢ZGT}
BIZS_ZDT_L2:=TDXDLL1(215,H,L,C); {笔中枢ZDT}

{画笔}
DRAWLINE(BI_KIND=1, BI_VALUE, BI_KIND=-1, BI_VALUE,0),COLORGREEN,DOTLINE, LINETHICK1;
DRAWLINE(BI_KIND=-1, BI_VALUE, BI_KIND=1, BI_VALUE,0),COLORMAGENTA,DOTLINE, LINETHICK1;


{画笔上升中枢}
DRAWLINE(BIZS_HEAD=2 AND BIZS_H_DIR>=0, BIZS_ZGH, BIZS_TAIL=-2 AND BIZS_T_DIR>=0, BIZS_ZGT,0),COLORRED, LINETHICK2;
DRAWLINE(BIZS_HEAD=2 AND BIZS_H_DIR>=0, BIZS_ZDH, BIZS_TAIL=-2 AND BIZS_T_DIR>=0, BIZS_ZDT,0),COLORRED, LINETHICK2;
STICKLINE(BIZS_HEAD=2 AND BIZS_H_DIR>=0, BIZS_ZGH, BIZS_ZDH, BIZS_HEAD=2 AND BIZS_H_DIR>=0,0),COLORRED, LINETHICK2;
STICKLINE(BIZS_TAIL=-2 AND BIZS_T_DIR>=0, BIZS_ZGT, BIZS_ZDT, BIZS_TAIL=-2 AND BIZS_T_DIR>=0,0),COLORRED, LINETHICK2;
DRAWLINE(BIZS_HEAD=2 AND BIZS_H_DIR>=0, (BIZS_ZGH+BIZS_ZDH)/2, BIZS_TAIL=-2 AND BIZS_T_DIR>=0, (BIZS_ZGT+BIZS_ZDT)/2,0),COLORRED, DOTLINE;

{画笔下降中枢}
DRAWLINE(BIZS_HEAD=2 AND BIZS_H_DIR<0, BIZS_ZGH, BIZS_TAIL=-2 AND BIZS_T_DIR<0, BIZS_ZGT,0),COLORGREEN, LINETHICK2;
DRAWLINE(BIZS_HEAD=2 AND BIZS_H_DIR<0, BIZS_ZDH, BIZS_TAIL=-2 AND BIZS_T_DIR<0, BIZS_ZDT,0),COLORGREEN, LINETHICK2;
STICKLINE(BIZS_HEAD=2 AND BIZS_H_DIR<0, BIZS_ZGH, BIZS_ZDH, BIZS_HEAD=2 AND BIZS_H_DIR<0,0),COLORGREEN, LINETHICK2;
STICKLINE(BIZS_TAIL=-2 AND BIZS_T_DIR<0, BIZS_ZGT, BIZS_ZDT, BIZS_TAIL=-2 AND BIZS_T_DIR<0,0),COLORGREEN, LINETHICK2;
DRAWLINE(BIZS_HEAD=2 AND BIZS_H_DIR<0, (BIZS_ZGH+BIZS_ZDH)/2, BIZS_TAIL=-2 AND BIZS_T_DIR<0, (BIZS_ZGT+BIZS_ZDT)/2,0),COLORGREEN, DOTLINE;

{画笔中枢L2}
{DRAWLINE(BIZS_HEAD_L2=3, BIZS_ZGH_L2, BIZS_TAIL_L2=-3, BIZS_ZGT_L2,0),COLORBLUE, LINETHICK2;
DRAWLINE(BIZS_HEAD_L2=3, BIZS_ZDH_L2, BIZS_TAIL_L2=-3, BIZS_ZDT_L2,0),COLORBLUE, LINETHICK2;
DRAWLINE(BIZS_HEAD_L2=3, (BIZS_ZGH_L2+BIZS_ZDH_L2)/2, BIZS_TAIL_L2=-3, (BIZS_ZGT_L2+BIZS_ZDT_L2)/2,0),COLORWHITE, DOTLINE;
STICKLINE(BIZS_HEAD_L2=3, BIZS_ZGH_L2, BIZS_ZDH_L2, BIZS_HEAD_L2=3,0),COLORBLUE, LINETHICK2;
STICKLINE(BIZS_TAIL_L2=-3, BIZS_ZGT_L2, BIZS_ZDT_L2, BIZS_TAIL_L2=-3,0),COLORBLUE, LINETHICK2;}


{画笔能量}
{DRAWTEXT(BI_ENERGY>0,BI_VALUE*1,VAR2STR(BI_ENERGY,2)),COLORYELLOW,DRAWABOVE;
DRAWTEXT(BI_ENERGY<0,BI_VALUE*1,VAR2STR(BI_ENERGY,2)),COLORGREEN;}

{画笔价格}
{DRAWNUMBER(BI_KIND=1,BI_VALUE*1.001,HIGH),COLORWHITE,DRAWABOVE;
DRAWNUMBER(BI_KIND=-1,BI_VALUE*1,LOW),COLORGREEN;}


{绘制最后当下的力度}
DRAWTEXT(BI_ENERGY>0 && CURRBARSCOUNT=1,CLOSE,VAR2STR(BI_ENERGY,2)),COLORYELLOW,DRAWABOVE;
DRAWTEXT(BI_ENERGY<0 && CURRBARSCOUNT=1,CLOSE,VAR2STR(BI_ENERGY,2)),COLORGREEN;

笔类型:PARA,NODRAW,COLORYELLOW;


{均线部分}
MA(C,N1),COLORYELLOW;
MA(C,N2),COLORRED;
MA(C,N3),COLORBLUE;
笔尾日:=BARSLAST(BIZS_TAIL=-2),NODRAW;
绿中枢UP:=REF(BIZS_ZGT,笔尾日),COLORGREEN,NODRAW;
绿中枢MID:=(绿中枢UP+REF(BIZS_ZDT,笔尾日))/2,COLORWHITE,NODRAW;
绿中枢DN:=REF(BIZS_ZDT,笔尾日),COLORGREEN,NODRAW;

{蓝尾日:=BARSLAST(BIZS_TAIL_L2=-3),NODRAW;
蓝中枢UP:=REF(BIZS_ZGT_L2,蓝尾日),COLORBLUE,NODRAW;
蓝中枢MID:=(蓝中枢UP+REF(BIZS_ZDT_L2,蓝尾日))/2,COLORWHITE,NODRAW;
蓝中枢DN:=REF(BIZS_ZDT_L2,蓝尾日),COLORBLUE,NODRAW;}

DRAWNUMBER(BIZS_TAIL=-2,绿中枢UP,绿中枢UP),COLORGREEN;
DRAWNUMBER(BIZS_TAIL=-2,绿中枢DN,绿中枢DN),COLORGREEN;
DRAWNUMBER(BIZS_TAIL=-2,绿中枢MID,绿中枢MID),COLORWHITE;

{DRAWNUMBER(BIZS_TAIL_L2=-3 AND BIZS_TAIL<>-2,蓝中枢UP,蓝中枢UP),COLORBLUE;
DRAWNUMBER(BIZS_TAIL_L2=-3 AND BIZS_TAIL<>-2,蓝中枢DN,蓝中枢DN),COLORBLUE;
DRAWNUMBER(BIZS_TAIL_L2=-3 AND BIZS_TAIL<>-2,蓝中枢MID,蓝中枢MID),COLORWHITE;}

SHORT:=12;LONG:=26;MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD:=(DIF-DEA)*2,COLORSTICK;

笔尖:=BI_KIND,NODRAW;
笔涨日:=BARSLAST(笔尖=-1),NODRAW;
笔跌日:=BARSLAST(笔尖=1),NODRAW;


笔力度:=BI_ENERGY;
有效红柱:=IF(笔涨日<笔跌日 AND MACD>0,MACD,0);
有效绿柱:=IF(笔涨日>笔跌日 AND MACD<0,MACD,0);
红面积:=SUM(有效红柱,笔涨日),NODRAW;
绿面积:=SUM(有效绿柱,笔跌日),NODRAW;

LAST底:=IF(笔尖=-1,REF(L,REF(笔涨日,1)+1),DRAWNULL),NODRAW;
LAST顶:=IF(笔尖=1,REF(H,REF(笔跌日,1)+1),DRAWNULL),NODRAW;
创新低:=笔尖=-1 AND L<LAST底,NODRAW;
创新高:=笔尖=1 AND H>LAST顶,NODRAW;
创新低日:=BARSLAST(创新低=1),NODRAW;
创新高日:=BARSLAST(创新高=1),NODRAW;

LD底背:=L<REF(L,REF(创新低日,1)+1) AND 笔力度>REF(笔力度,REF(创新低日,1)+1) AND 创新低,COLORMAGENTA,NODRAW;
X底背:=L<REF(L,REF(创新低日,1)+1) AND DIF>REF(DIF,REF(创新低日,1)+1) AND 创新低,COLORMAGENTA,NODRAW;
Z底背:=L<REF(L,REF(创新低日,1)+1) AND MACD>REF(MACD,REF(创新低日,1)+1) AND 创新低,COLORMAGENTA,NODRAW;
M底背:=L<REF(L,REF(创新低日,1)+1) AND 绿面积>REF(绿面积,REF(创新低日,1)+1) AND 创新低,COLORMAGENTA,NODRAW;
大底背:=X底背 OR Z底背 OR M底背;

LD顶背:=H>REF(H,REF(创新高日,1)+1) AND 笔力度<REF(笔力度,REF(创新高日,1)+1) AND 创新高,COLORCYAN,NODRAW;
X顶背:=H>REF(H,REF(创新高日,1)+1) AND DIF<REF(DIF,REF(创新高日,1)+1) AND 创新高,COLORCYAN,NODRAW;
Z顶背:=H>REF(H,REF(创新高日,1)+1) AND MACD<REF(MACD,REF(创新高日,1)+1) AND 创新高,COLORCYAN,NODRAW;
M顶背:=H>REF(H,REF(创新高日,1)+1) AND 红面积<REF(红面积,REF(创新高日,1)+1) AND 创新高,COLORCYAN,NODRAW;
大顶背:=X顶背 OR Z顶背 OR M顶背;

X小底背:=大底背=0 AND L<REF(L,REF(笔涨日,1)+1) AND DIF>REF(DIF,REF(笔涨日,1)+1) AND 创新低,COLORMAGENTA,NODRAW;
Z小底背:=大底背=0 AND L<REF(L,REF(笔涨日,1)+1) AND MACD>REF(MACD,REF(笔涨日,1)+1) AND 创新低,COLORMAGENTA,NODRAW;
M小底背:=大底背=0 AND L<REF(L,REF(笔涨日,1)+1) AND 绿面积>REF(绿面积,REF(笔涨日,1)+1) AND 创新低,COLORMAGENTA,NODRAW;

X小顶背:=大顶背=0 AND H>REF(H,REF(笔跌日,1)+1) AND DIF<REF(DIF,REF(笔跌日,1)+1) AND 创新高,COLORCYAN,NODRAW;
Z小顶背:=大顶背=0 AND H>REF(H,REF(笔跌日,1)+1) AND MACD<REF(MACD,REF(笔跌日,1)+1) AND 创新高,COLORCYAN,NODRAW;
M小顶背:=大顶背=0 AND H>REF(H,REF(笔跌日,1)+1) AND 红面积<REF(红面积,REF(笔跌日,1)+1) AND 创新高,COLORCYAN,NODRAW;

大底背数:=X底背+Z底背+M底背,COLORMAGENTA,NODRAW;
大顶背数:=X顶背+Z顶背+M顶背,COLORCYAN,NODRAW;

小底背数:=X小底背+Z小底背+M小底背,COLORMAGENTA,NODRAW;
小顶背数:=X小顶背+Z小顶背+M小顶背,COLORCYAN,NODRAW;
三买:=笔尖=-1 AND L>绿中枢UP AND SUM(笔尖=-1 AND L>绿中枢UP,笔尾日)=1,COLORMAGENTA,NODRAW;
三卖:=笔尖=1 AND H<绿中枢DN AND SUM(笔尖=1 AND H<绿中枢DN,笔尾日)=1,COLORCYAN,NODRAW;
三卖日:=BARSLAST(三卖),NODRAW;
三买日:=BARSLAST(三买),NODRAW;

一买:=三卖日<三买日 AND 创新低 AND 大底背数>0,COLORMAGENTA,NODRAW;
二买:=三卖日<三买日 AND 笔尖=-1 AND L>LAST底 AND REF(创新低日,1)=REF(笔涨日,1),COLORMAGENTA,NODRAW;


一卖:=三卖日>三买日 AND 创新高 AND 大顶背数>0,COLORCYAN,NODRAW;
二卖:=三卖日>三买日 AND 笔尖=1 AND H<LAST顶 AND REF(创新高日,1)=REF(笔跌日,1),COLORCYAN,NODRAW;

DRAWTEXT(一买,L*0.99,'(1)'),COLORWHITE;
DRAWTEXT(二买 AND 三买=0,L*0.99,'(2)'),COLORWHITE;
DRAWTEXT(二买 AND 三买,L*0.99,'(23)'),COLORWHITE;
DRAWTEXT(二买=0 AND 三买,L*0.99,'(3)'),COLORWHITE;

DRAWTEXT(一卖,H,'(1)'),COLORCYAN,DRAWABOVE;
DRAWTEXT(二卖 AND 三卖=0,H,'(2)'),COLORCYAN,DRAWABOVE;
DRAWTEXT(二卖 AND 三卖,H,'(23)'),COLORCYAN,DRAWABOVE;
DRAWTEXT(二卖=0 AND 三卖,H,'(3)'),COLORCYAN,DRAWABOVE;

ST:=NAMELIKE('ST')=1 OR NAMELIKE('*ST')=1 OR NAMELIKE('SST')=1
OR NAMELIKE('S*ST')=1 OR NAMELIKE('S ST')=1;
涨停:=C/REF(C,1)>1.0995 OR (C/REF(C,1)>1.0495 AND ST);
跌停:=REF(C,1)/C>1.0995 OR (REF(C,1)/C>1.0495 AND ST);
STICKLINE(涨停,C,O,4,0),COLORYELLOW;
STICKLINE(跌停,C,O,4,0),COLORLIGREEN;

推荐下载

赞助商广告