缠论新笔旧笔与三类买卖点 通达信指标 源码 贴图

2019-01-30 10:30:00来源:本站整理浏览:2877

缠论新笔旧笔与三类买卖点 通达信指标 源码 贴图

感觉新笔更得实战。从下图产看第二种笔的处理的第三类买点更合理。

缠论新笔旧笔与三类买卖点 通达信指标 源码 贴图

缠论新笔旧笔与三类买卖点 通达信指标 源码 贴图

缠论新笔旧笔与三类买卖点 通达信指标 源码 贴图点击下载缠论新笔旧笔与三类买卖点 通达信指标 源码 贴图


MA1:MA(CLOSE,M1),COLORWHITE;
MA2:MA(CLOSE,M2),COLORYELLOW;
MA3:MA(CLOSE,M3),COLORMAGENTA;
MA4:MA(CLOSE,M4),COLORGREEN;
顶底分型:=1;
{满足以上条件在左上角显示内容}
VAR1:=TDXDLL5(1,H,L,C);
VAR2:=TDXDLL5(2,H,L,笔类型);
VAR3:=TDXDLL5(3,H,L,笔类型);
VAR4:=TDXDLL5(4,H,L,C);
ZSKSLAST:=TDXDLL5(8,H,L,C);
ZSJSLAST:=TDXDLL5(7,H,L,C);
ZSZD:=TDXDLL5(9,H,L,C);
ZSZG:=TDXDLL5(10,H,L,C);
ZSZZ:=TDXDLL5(11,H,L,0);
BILAST:=TDXDLL5(13,H,L,C);
DUANLAST:=TDXDLL5(12,H,L,C);
DUANFX:=TDXDLL5(14,H,L,C);
BLX:=IF(布林线>0,1,0);
MID : MA(CLOSE,布林参数*BLX);
UPPER: MA(MID + 2*STD(CLOSE,布林参数),BLX);
LOWER: MA(MID - 2*STD(CLOSE,布林参数),BLX);
STICKLINE(布林线=2 ,UPPER, MID,10,0),COLOR400080, LINETHICK1;
STICKLINE(布林线=2 ,LOWER, MID,10,0),COLOR804000, LINETHICK1;

STICKLINE(MOD(笔中枢,10)=3 AND DUANFX=-1 ,ZSZG, ZSZD,0,0),COLOR000044, LINETHICK1;
STICKLINE(MOD(笔中枢,10)=3 AND DUANFX=1 ,ZSZG, ZSZD,0,0),COLOR004400, LINETHICK1;

STICKLINE(MOD(笔中枢,10)=2 AND DUANFX=-1 ,REF(ZSZG,1), REF(ZSZD,1),10,0),COLOR004000, LINETHICK1;
STICKLINE(MOD(笔中枢,10)=2 AND DUANFX=1 ,REF(ZSZG,1), REF(ZSZD,1),10,0),COLOR400080, LINETHICK1;
上笔:DRAWLINE(画笔>=1 && VAR2=-1,L,VAR2=1,H,0),COLORRED;
下笔:DRAWLINE(画笔>=1 && VAR2=1 ,H,VAR2=-1,L,0),COLORGREEN;
上段:DRAWLINE(画段>=1 && VAR3=-1,L,VAR3=1,H,0),COLORMAGENTA,LINETHICK2;
下段:DRAWLINE(画段>=1 && VAR3=1 ,H,VAR3=-1,L,0),COLORBLUE,LINETHICK2;
上尾段:DRAWLINE(画段=2 && VAR3=-1,L,VAR3=100,H,0),COLORMAGENTA,LINETHICK2;
下尾段:DRAWLINE(画段=2 && VAR3=1 ,H,VAR3=-100,L,0),COLORBLUE,LINETHICK2;
DRAWLINE(画笔=2 && VAR2=1 ,H,VAR2=-10,L,0),COLOR0080FF,DOTLINE;
DRAWLINE(画笔=2 && VAR2=-1,L,VAR2=10,H,0),COLOR0080FF,DOTLINE;
DRAWLINE(笔中枢=2 && VAR2=1 ,H,VAR2=-1,L,0),COLORYELLOW;
DRAWLINE(笔中枢=2 && VAR2=-1,L,VAR2=1,H,0),COLORYELLOW;
DRAWLINE(笔中枢=3 && VAR2=1 ,H,VAR2=-1,L,0),,COLORGREEN;
DRAWLINE(笔中枢=3 && VAR2=-1,L,VAR2=1,H,0),COLORRED;
TT:=(MA(HIGH,15)-MA(LOW,15))/200*周期位置;
S3:=TDXDLL5(19,H,L,C);
买点概率:=IF(S3>15,S3,0);
S4:=TDXDLL5(93,H,L,C);
卖点概率:=IF(S4>15,S4,0);
DRAWNUMBER(H-REF(L,BILAST)>0 AND MOD(笔参数,10)=1 && CURRBARSCOUNT=1,H+TT,BARSLAST(VAR2=-1)),COLORYELLOW;
DRAWNUMBER(L-REF(H,BILAST)<0 AND MOD(笔参数,10)=1 && CURRBARSCOUNT=1,L-TT,BARSLAST(VAR2=1)),COLORGREEN;
DRAWLINE(MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSKSLAST=1 AND DUANFX=1, ZSZG, MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSJSLAST=1 AND DUANFX=1, ZSZG, 0), COLORRED, LINETHICK1;
DRAWLINE(MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSKSLAST=1 AND DUANFX=1, ZSZD, MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSJSLAST=1 AND DUANFX=1, ZSZD, 0), COLORRED, LINETHICK1;
STICKLINE(MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSKSLAST=1 AND DUANFX=1, ZSZG, ZSZD, 0, 0), COLORRED, LINETHICK1;
STICKLINE(MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSJSLAST=1 AND DUANFX=1, ZSZG, ZSZD, 0, 0), COLORRED, LINETHICK1;

DRAWLINE(MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSKSLAST=1 AND DUANFX=-1, ZSZG, MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSJSLAST=1 AND DUANFX=-1, ZSZG, 0), COLORGREEN, LINETHICK1;
DRAWLINE(MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSKSLAST=1 AND DUANFX=-1, ZSZD, MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSJSLAST=1 AND DUANFX=-1, ZSZD, 0), COLORGREEN, LINETHICK1;
STICKLINE(MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSKSLAST=1 AND DUANFX=-1, ZSZG, ZSZD, 0, 0), COLORGREEN, LINETHICK1;
STICKLINE(MOD(笔中枢,10)=1 OR MOD(笔中枢,10)=3 && ZSJSLAST=1 AND DUANFX=-1, ZSZG, ZSZD, 0,0), COLORGREEN, LINETHICK1;

DRAWLINE(MOD(笔中枢,10)>=1 && ZSKSLAST=1, ZSZZ, ZSJSLAST=1, ZSZZ, 0), COLORYELLOW,DOTLINE;
VAR19:=TDXDLL5(22,H,L,C);
VAR22:=TDXDLL5(22,H,L,1);
VAR23:=TDXDLL5(23,H,L,1);
VAR24:=TDXDLL5(24,H,L,1);
VAR25:=TDXDLL5(25,H,L,1);
ZSLXZSJSLAST:=TDXDLL5(26,H,L,1);
ZSLXZSKSLAST:=TDXDLL5(27,H,L,1);
ZSLXZSZD:=TDXDLL5(28,H,L,1);
ZSLXZSZG:=TDXDLL5(29,H,L,1);
VAR30:=TDXDLL5(30,H,L,1);
DRAWLINE((PERIOD==0 OR 段中枢=1) && VAR22=1 ,H,VAR22=-1,L,0),COLORFF00FF,LINETHICK1;
DRAWLINE((PERIOD==0 OR 段中枢=1) && VAR22=-1,L,VAR22=1,H,0),COLORFF00FF,LINETHICK1;
DRAWLINE((PERIOD==0 OR 段中枢=1) && ZSLXZSKSLAST=1, ZSLXZSZG, ZSLXZSJSLAST=1, ZSLXZSZG, 0), COLORMAGENTA, LINETHICK1;
DRAWLINE((PERIOD==0 OR 段中枢=1) && ZSLXZSKSLAST=1, ZSLXZSZD, ZSLXZSJSLAST=1, ZSLXZSZD, 0), COLORMAGENTA, LINETHICK1;
STICKLINE((PERIOD==0 OR 段中枢=1) && ZSLXZSKSLAST=1, ZSLXZSZG, ZSLXZSZD, 0.2, 0), COLORMAGENTA, LINETHICK1;
STICKLINE((PERIOD==0 OR 段中枢=1) && ZSLXZSJSLAST=1, ZSLXZSZG, ZSLXZSZD, 0.2, 0), COLORMAGENTA, LINETHICK1;
DRAWKLINE(H,O,L,C);
{阳线上下影}
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE>=OPEN,CLOSE,HIGH,0,0), COLORRED;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE>=OPEN,OPEN,LOW,0,0), COLORRED;
{阴线上下影}
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE<OPEN,OPEN,HIGH,0,0), COLOR00EC00;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE<OPEN,CLOSE,LOW,0,0), COLOR00EC00;
{阳K线}
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,2.8.2,0),COLOR0000A1;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,1.9.2,0),COLOR0000B5;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,0.9.8,0),COLOR0000C5;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,0.4,0),COLOR0000D4;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,0.2,0),COLOR0000FF;
{阴K线}
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE<OPEN,CLOSE,OPEN,2.8.2,0),COLOR009000;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE<OPEN,CLOSE,OPEN,1.9.2,0),COLOR00B400;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE<OPEN,CLOSE,OPEN,0.9.8,0),COLOR00C100;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE<OPEN,CLOSE,OPEN,0.4,0),COLOR00DB00;
STICKLINE(MOD(笔中枢,10)=2 AND CLOSE<OPEN,CLOSE,OPEN,0.2,0),COLOR00EC00;

ST:=NAMELIKE('ST')=1 OR NAMELIKE('*ST')=1 OR NAMELIKE('SST')=1 OR NAMELIKE('S*ST')=1 OR NAMELIKE('S ST')=1;
ZTB:=(C/REF(C,1)>1.0995 OR (C/REF(C,1)>1.0495 AND ST)) AND CLOSE=HIGH AND PERIOD = 5;
DTB:=(REF(C,1)/C>1.0995 OR (REF(C,1)/C>1.0495 AND ST)) AND CLOSE=LOW AND PERIOD = 5;
STICKLINE(ZTB,C,O,3,0),COLORYELLOW;
STICKLINE(DTB,C,O,3,0),COLORLIGREEN;
VIP:=1;
SHORT:=12;LONG:=26;MID1:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID1);
MACD:=(DIF-DEA)*2,COLORSTICK;
笔尾日:=BARSLAST(ZSJSLAST=1);
中枢UP:=REF(ZSZG,笔尾日),COLORGREEN;
中枢MID:=ZSZZ,COLORWHITE,NODRAW;
中枢DN:=REF(ZSZD,笔尾日),COLORGREEN;
笔涨日:=BARSLAST(VAR2=-1),NODRAW;
笔跌日:=BARSLAST(VAR2=1),NODRAW;
有效红柱:=IF(笔涨日<笔跌日 AND MACD>0,MACD,0);
有效绿柱:=IF(笔涨日>笔跌日 AND MACD<0,MACD,0);
红面积:=SUM(有效红柱,笔涨日),NODRAW;
绿面积:=SUM(有效绿柱,笔跌日),NODRAW;
LAST底:=IF(VAR2=-1,REF(L,REF(笔涨日,1)+1),DRAWNULL),NODRAW;
LAST顶:=IF(VAR2=1,REF(H,REF(笔跌日,1)+1),DRAWNULL),NODRAW;
创新低:=VAR2=-1 AND L<LAST底,NODRAW;
创新高:=VAR2=1 AND H>LAST顶,NODRAW;
创新低日:=BARSLAST(创新低=1),NODRAW;
创新高日:=BARSLAST(创新高=1),NODRAW;
LD底背:=L<REF(L,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 创新高,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;
三买:=VAR2=-1 AND L>中枢UP AND SUM(VAR2=-1 AND L>中枢UP,笔尾日)=1,COLORMAGENTA;
三卖:=VAR2=1 AND H<中枢DN AND SUM(VAR2=1 AND H<中枢DN,笔尾日)=1,COLORCYAN;
三卖日:=BARSLAST(三卖),NODRAW;
三买日:=BARSLAST(三买),NODRAW;
一买:=三卖日<三买日 AND 创新低 AND 大底背数>0,COLORMAGENTA;
二买:=三卖日<三买日 AND VAR2=-1 AND L>LAST底 AND REF(创新低日,1)=REF(笔涨日,1),COLORMAGENTA;
一卖:=三卖日>三买日 AND 创新高 AND 大顶背数>0,COLORCYAN;
二卖:=三卖日>三买日 AND VAR2=1 AND H<LAST顶 AND REF(创新高日,1)=REF(笔跌日,1),COLORCYAN;
DRAWICON(VAR1=1 && 顶底分型 && 分型买卖=1,H+2*TT, 2);
DRAWICON(VAR1=-1 && 顶底分型&& 分型买卖=1,L-2*TT,1);
DRAWTEXT(MOD(笔参数,10)=1 && VAR2=1 , H+TT, VAR2STR(BILAST,0)), COLORYELLOW;
DRAWTEXT(MOD(笔参数,10)=1 && VAR2=-1 , L-TT, VAR2STR(BILAST,0)), COLORYELLOW;
DRAWTEXT(MOD(笔参数,100)>=10 && VAR2=1 , H+周期位置/4*TT, VAR2STR(H,2)), COLORFFFF00;
DRAWTEXT(MOD(笔参数,100)>=10 && VAR2=-1 , L-周期位置/4*TT, VAR2STR(L,2)), COLORFFFF00;
DRAWTEXT(MOD(笔参数,1000)>=100 && VAR3=1 , H+周期位置/2*TT, VAR2STR(DUANLAST,0)), COLORFF00FF;
DRAWTEXT(MOD(笔参数,1000)>=100 && VAR3=-1 , L-周期位置/2*TT, VAR2STR(DUANLAST,0)), COLORFF00FF;
DRAWTEXT(MOD(笔参数,10)>=3 && VAR3=1 , H+周期位置/2*TT, VAR2STR(DUANLAST,0)), COLORFF00FF;
DRAWTEXT(MOD(笔参数,10)>=3 && VAR3=-1 , L-周期位置/2*TT, VAR2STR(DUANLAST,0)), COLORFF00FF;
{DRAWTEXT(买点概率>=20 && VAR2=-1 , L-周期位置/1.6*TT, VAR2STR(买点概率,2)), COLORRED;
DRAWTEXT(卖点概率>=20 && VAR2=1 , H+周期位置/1.6*TT, VAR2STR(卖点概率,2)), COLORRED;}
DRAWTEXT(分型买卖=2 AND 一卖 AND VIP=1,H+周期位置/1.1*TT,'一卖'),COLORCYAN;
DRAWTEXT(分型买卖=2 AND 二卖 AND 三卖=0 AND VIP=1,H+周期位置/1.2*TT,'二卖'),COLORCYAN;
DRAWTEXT(分型买卖=2 AND 三卖 AND 二卖=0 AND VIP=1,H+周期位置/1.2*TT,'三卖'),COLORCYAN;
DRAWTEXT(分型买卖=2 AND 二卖 AND 三卖 AND VIP=1,H+周期位置/1.2*TT,'二三卖'),COLORCYAN;
DRAWTEXT(分型买卖=2 AND 一买 AND VIP=1,L-周期位置/1.1*TT,'一买'),COLORYELLOW;
DRAWTEXT(分型买卖=2 AND 二买 AND VIP=1 AND 三买=0,L-周期位置/1.2*TT,'二买'),COLORYELLOW;
DRAWTEXT(分型买卖=2 AND 三买 AND VIP=1 AND 二买=0,L-周期位置/1.2*TT,'三买'),COLORYELLOW;
DRAWTEXT(分型买卖=2 AND 二买 AND VIP=1 AND 三买,L-周期位置/1.2*TT,'二三买'),COLORYELLOW;

DRAWTEXT(笔中枢>10 && ZSJSLAST=1,ZSZG,VAR2STR(ZSZG,2));
DRAWTEXT(笔中枢>10 && ZSJSLAST=1,ZSZD,VAR2STR(ZSZD,2));
DRAWTEXT(笔中枢>10 && ZSJSLAST=1,ZSZZ,VAR2STR(ZSZZ,2));

品种类型:=FINANCE(3);
所属板块:=HYBLOCK;
上市天数:=FINANCE(42);
股总市值:=ROUND(FINANCE(41)/100000000);
流通市值:=ROUND(FINANCE(40)/100000000);
股东人数:=FINANCE(8);
人均持股:=ROUND(FINANCE(7)/FINANCE(8));
DRAWTEXT_FIX(1,0.008,0.01,0,'基本资料:'),COLORFFCC99;
DRAWTEXT_FIX(1,0.008,0.05,0,'品种类型:'),COLOR99CCFF;
DRAWTEXT_FIX(1,0.008,0.09,0,'行业板块:'),COLOR99CCFF;
DRAWTEXT_FIX(1,0.008,0.13,0,'上市天数:'),COLOR99CCFF;
DRAWTEXT_FIX(1,0.008,0.17,0,'股东人数:'),COLOR99CCFF;
DRAWTEXT_FIX(1,0.008,0.21,0,'人均持股:'),COLOR99CCFF;

DRAWTEXT_FIX(品种类型=1,0.065,0.05,0,'沪 深 A 股'),COLORWHITE;
DRAWTEXT_FIX(品种类型=2,0.065,0.05,0,' 中 小 板'),COLORWHITE;
DRAWTEXT_FIX(品种类型=3,0.065,0.05,0,' 创 业 板'),COLORWHITE;
DRAWTEXT_FIX(1,0.065,0.09,0,HYBLOCK),COLORWHITE;{行业板块}

DRAWNUMBER_FIX(1,0.065,0.17,0,股东人数),COLORWHITE;
DRAWNUMBER_FIX(1,0.065,0.21,0,人均持股),COLORWHITE;

DRAWTEXT_FIX(1,0.008,0.25,0,'地区板块:')COLOR99CCFF;
DRAWTEXT_FIX(1,0.065,0.25,0,DYBLOCK)COLORWHITE;
DRAWTEXT_FIX(1,0.008,0.29,0,'概念板块:')COLOR99CCFF;
DRAWTEXT_FIX(1,0.065,0.29,0,GNBLOCK)COLORWHITE;
DRAWTEXT_FIX(1,0.008,0.33,0,'风格板块:')COLOR99CCFF;
DRAWTEXT_FIX(1,0.065,0.33,0,FGBLOCK)COLORWHITE;
DRAWTEXT_FIX(1,0.008,0.37,0,'自定板块:')COLOR99CCFF;
DRAWTEXT_FIX(1,0.065,0.37,0,ZDBLOCK)COLORWHITE;


 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式