当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码精选:大阳线,最牛抓板分时,抓板资金监控

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、大阳线

{大阳线 通达信主图公式 源码}

前收:DYNAINFO(3),DOTLINE,NODRAW;
开盘:DYNAINFO(4),DOTLINE,NODRAW;
开盘%:(DYNAINFO(4)-DYNAINFO(3))/DYNAINFO(3)*100,NODRAW;
最高:DYNAINFO(5),DOTLINE,NODRAW;
最高%:(DYNAINFO(5)-DYNAINFO(3))/DYNAINFO(3)*100,NODRAW;
最低:DYNAINFO(6),DOTLINE,NODRAW;
最低%:(DYNAINFO(6)-DYNAINFO(3))/DYNAINFO(6)*100,NODRAW;
最新:DYNAINFO(7),DOTLINE,NODRAW;
实体柱长:ABS(C-O),NODRAW;
实体涨跌幅:(DYNAINFO(7)-DYNAINFO(4))/DYNAINFO(4)*100,NODRAW;
实际涨跌幅:(DYNAINFO(7)-DYNAINFO(3))/DYNAINFO(3)*100,NODRAW;
 
上影长:H-MAX(O,C),NODRAW;
下影长:MIN(O,C)-L,NODRAW;
上影幅度:((H-REF(C,1))/REF(C,1)-(MAX(O,C)-REF(C,1))/REF(C,1))*100,NODRAW;
下影幅度:((REF(C,1)-L)/REF(C,1)-(REF(C,1)-MIN(O,C))/REF(C,1))*100,NODRAW;
 
DA1:=IF(DATE>TOTALBARSCOUNT,TOTALBARSCOUNT,DATE);
 DA:=IF(CURRBARSCOUNT>DA1,DATE,DA1);
 HI:=REFDATE(HHV(H,DA),DATE);
 LO:=REFDATE(LLV(L,DA),DATE);
 C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL);
 GZ:=EXP(LN(HI/LO)/10); 
 LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA);
 LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA);
 LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA);
 LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA);
 LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA);
 LH6:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA);
 LH7:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA);
 LH8:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA);
 LH9:=SUM(IF(C1>=(LO*GZ) AND C1<LO*POW(GZ,2),V,0),DA);
 LH10:=SUM(IF(C1>=LO AND C1<LO*GZ,V,0),DA);
 L1:=REFDATE(HHV(LH1,DA),DATE),LINETHICK0;
 L2:=REFDATE(HHV(LH2,DA),DATE),LINETHICK0;
 L3:=REFDATE(HHV(LH3,DA),DATE),LINETHICK0;
 L4:=REFDATE(HHV(LH4,DA),DATE);
 L5:=REFDATE(HHV(LH5,DA),DATE);
 L6:=REFDATE(HHV(LH6,DA),DATE);
 L7:=REFDATE(HHV(LH7,DA),DATE);
 L8:=REFDATE(HHV(LH8,DA),DATE);
 L9:=REFDATE(HHV(LH9,DA),DATE);
 L10:=REFDATE(HHV(LH10,DA),DATE);
 SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10);
 STICKLINE(CEILING(DA*L1/SS)*3>=CURRBARSCOUNT,HI*99/100,HI/GZ,9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L2/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,1)*99/100,HI/POW(GZ,2),9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L3/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,2)*99/100,HI/POW(GZ,3),9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L4/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,3)*99/100,HI/POW(GZ,4),9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L5/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,4)*99/100,HI/POW(GZ,5),9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L6/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,5)*99/100,HI/POW(GZ,6),9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L7/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,6)*99/100,HI/POW(GZ,7),9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L8/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L9/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
 STICKLINE(CEILING(DA*L10/SS)*3>=CURRBARSCOUNT,LO,LO*POW(GZ,1)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
 
 
 
STICKLINE(DOPEN<DCLOSE,DHIGH,DLOW,4,0),COLOR33BBBB;
STICKLINE(DOPEN<DCLOSE,DOPEN,DCLOSE,4,0),COLOR8833CC;
STICKLINE(DOPEN>DCLOSE,DHIGH,DLOW,4,0),COLORAA3333;
STICKLINE(DOPEN>DCLOSE,DOPEN,DCLOSE,4,0),COLOR668833;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
 
 
{以下是涨跌周期大阳线}
 
趋势大阳线:((DCLOSE/DOPEN>=1.07) AND DCLOSE>DOPEN);
趋势假阳线:((DCLOSE/DOPEN>=1.01) AND DCLOSE<DOPEN);
DRAWTEXT(DCLOSE/DOPEN>=1.07,DLOW,'大阳线');
 
DYX11:=BARSLAST(趋势大阳线);
GH1:=FILTER(趋势大阳线,DATE);
BH1:=BARSLAST(趋势大阳线);
 
STICKLINE(趋势大阳线,REF(DHIGH,BH1),REF(DLOW,BH1),4,0),COLOR0F03A0;
STICKLINE(趋势大阳线,REF(DOPEN,BH1),REF(DCLOSE,BH1),4,0),COLOR3207FC;
 
STICKLINE(DCLOSE,REF(DLOW,BH1),REF(DOPEN,BH1),4,0),COLORGREEN;
STICKLINE(DCLOSE,REF(DCLOSE,BH1),REF(DHIGH,BH1),4,0),COLORMAGENTA;
 
{涨停板回马枪}
ZT:=DCLOSE/REF(DCLOSE,1)>1.05;
XH:=FILTER(ZT,DATE);
BH:=BARSLAST(ZT);
STICKLINE(ZT,REF(DOPEN,BH),REF(DCLOSE,BH),1,0),COLORYELLOW;
 
STICKLINE(C>=O,H,L,0.3,0),COLORYELLOW;
STICKLINE(C<=O,H,L,0.3,0),COLORCYAN;
 
{以下是常规周期大阳线}
 
常规大阳线:((CLOSE/OPEN>=1.07) AND CLOSE>OPEN);
常规假阳线:((CLOSE/OPEN>=1.01) AND CLOSE<OPEN);
DRAWTEXT(CLOSE/OPEN>=1.07,LOW,'大阳线');
 
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
 
 
{黄金分割  普通 等系坐标}
DRAWRECTREL(990,2,998,188,RGB(0,150,180)),NOFRAME;
DRAWRECTREL(990,188,998,375,RGB(200,200,0)),NOFRAME;
DRAWRECTREL(990,375,998,491,RGB(100,200,0)),NOFRAME;
DRAWRECTREL(990,491,998,607,RGB(200,10,80)),NOFRAME;
DRAWRECTREL(990,607,998,794,RGB(150,0,0)),NOFRAME;
DRAWRECTREL(990,794,998,982,RGB(150,150,150)),NOFRAME;
 
当期收盘:DCLOSE,NODRAW;
当期最高:DHIGH,NODRAW;
当期最低:DLOW,NODRAW;
当期上影:DHIGH-MAX(DOPEN,DCLOSE),NODRAW;
当期下影:MIN(DOPEN,DCLOSE)-DLOW,NODRAW;
当期实体:ABS(DCLOSE-DOPEN),NODRAW;
当期涨幅:(DCLOSE-DOPEN)/DOPEN*100,NODRAW;
当期波幅:(DHIGH-DLOW)/DLOW*100,NODRAW;
涨跌周期统计:BARSLAST(O=DOPEN AND DVOL!=REF(DVOL,1))+1,NODRAW,COLORRED,COLORWHITE;
DRAWNUMBER(REFX(涨跌周期统计,1)<=涨跌周期统计 OR ISLASTBAR ,DHIGH,涨跌周期统计),DRAWABOVE;
DRAWTEXT_FIX(1,0.12,0.991,1,STRCAT('多空涨跌周期统计数据:',CON2STR(涨跌周期统计,2))),COLORWHITE;
日量比:=V/REF(V,1),COLORRED,LINETHICK4,VOLSTICK;
日换手:=SUM(VOL,1)*100/CAPITAL,NODRAW;
回头波:(DYNAINFO(7)-DYNAINFO(5))/DYNAINFO(5)*100,LINETHICK0;
攻击波:(DYNAINFO(7)-DYNAINFO(6))/DYNAINFO(6)*100,LINETHICK0;
 
 
 
 
{空间距离色块,普通等系坐标,自下而上,颜色越深风险越大}
DRAWRECTREL(0,0.1,10,999,RGB(255,0,0)),NOFRAME;    {6}
DRAWRECTREL(0,1,  10,888,RGB(255,0,50)),NOFRAME;   {5}
DRAWRECTREL(0,100,10,777,RGB(255,0,100)),NOFRAME;  {4}
DRAWRECTREL(0,200,10,666,RGB(255,0,150)),NOFRAME;  {3}
DRAWRECTREL(0,300,10,555,RGB(255,0,200)),NOFRAME;  {2}
DRAWRECTREL(0,400,10,444,RGB(255,0,250)),NOFRAME;  {1}
DRAWRECTREL(0,500,10,333,RGB(255,0,255)),NOFRAME;  {0}
DRAWRECTREL(0,600,10,444,RGB(0,255,250)),NOFRAME;  {1}
DRAWRECTREL(0,700,10,555,RGB(0,255,200)),NOFRAME;  {2}
DRAWRECTREL(0,800,10,666,RGB(0,255,150)),NOFRAME;  {3}
DRAWRECTREL(0,900,10,777,RGB(0,255,100)),NOFRAME;  {4}
DRAWRECTREL(0,999,10,888,RGB(0,255,50)),NOFRAME ;  {5}
DRAWRECTREL(0,999.9,10,999,RGB(0,255,0)),NOFRAME;  {6};
 
 
{画K线} 
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
DRAWRECTREL(500,300,555,308,RGB(0,150,180)),NOFRAME;
DRAWRECTREL(500,600,555,608,RGB(200,200,0)),NOFRAME;
DRAWRECTREL(500,900,555,908,RGB(100,200,0)),NOFRAME;
DRAWRECTREL(500,200,555,208,RGB(200,10,80)),NOFRAME;
DRAWRECTREL(500,500,555,508,RGB(150,0,0)),NOFRAME;
DRAWRECTREL(500,800,555,808,RGB(150,150,150)),NOFRAME;
{股民学院 www.58188.com 整理}



2、最牛抓板分时

{公式名称: 最牛抓板分时
画线方法: 副图}
VAR1:=STRCAT(HYBLOCK,1);
VAR2:=STRCAT(VAR1,DYBLOCK);
VAR3:=STRCAT(VAR2,1);
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(VAR3,GNBLOCK)),COLORYELLOW;
VAR4:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),(-VOL)/CAPITAL*100,0)),0);
VAR5:=VOL*CLOSE/100;
VAR6:=SUM(IF(VAR5/8>20 AND CLOSE>REF(CLOSE,1),VAR5,0),0);
VAR7:=SUM(IF(VAR5/8>20 AND CLOSE<REF(CLOSE,1),VAR5,0),0);
VAR8:=SUM(IF(VAR5/8<20 AND CLOSE>REF(CLOSE,1),VAR5,0),0);
VAR9:=SUM(IF(VAR5/8<20 AND CLOSE<REF(CLOSE,1),VAR5,0),0);
VAR10:=VAR6+VAR7+VAR8+VAR9;
VAR11:=IF(ISLASTBAR,100*VAR6/VAR10,0);
VAR12:=IF(ISLASTBAR,100*VAR7/VAR10,0);
VAR13:=IF(ISLASTBAR,100*VAR8/VAR10,0);
VAR14:=IF(ISLASTBAR,100*VAR9/VAR10,0);
机构买:VAR6,COLORRED,LINETHICK6;
机构卖:VAR7,COLORGREEN,LINETHICK6;
机构进出:机构买-机构卖,NODRAW;
散户买:VAR8,COLOR5555FF;
散户卖:VAR9,COLOR55FF55;
强势:100*VAR6/VAR10>50;
拉升:100*VAR6/VAR10-100*VAR7/VAR10>18 AND 100*VAR6/VAR10-100*VAR9/VAR10>18;
DRAWTEXT(ISLASTBAR=1,机构买*0.95,2),COLORRED,LINETHICK2;
DRAWTEXT(ISLASTBAR=1,机构卖*0.95,2),COLORFFFF55,LINETHICK2;
VAR15:=BETWEEN(CLOSE/(SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(VOL*100,BARSCOUNT(CLOSE))),1.05,0.95);
VAR16:=IF(VAR15=0,MA(CLOSE,BARSCOUNT(CLOSE)),SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(VOL*100,BARSCOUNT(CLOSE)));
DRAWICON(CROSS(CLOSE/VAR16,1.03),机构买*1.01,17);
VAR17:=1;
VAR18:=STRCAT(STRCAT(3,CON2STR(100*VAR6/VAR10,0)),4);
VAR19:=STRCAT(STRCAT(5,CON2STR(100*VAR7/VAR10,0)),4);
VAR20:=STRCAT(STRCAT(6,CON2STR(100*(VAR6-VAR7)/VAR10,0)),4);
VAR21:=STRCAT(STRCAT(7,CON2STR(100*VAR8/VAR10,0)),4);
VAR22:=STRCAT(STRCAT(8,CON2STR(100*VAR9/VAR10,0)),4);
VAR23:=STRCAT(STRCAT(9,CON2STR(100*(VAR8-VAR9)/VAR10,0)),4);
DRAWTEXT_FIX(VAR17=1,0.35,0.25,0,VAR18),COLORRED;
DRAWTEXT_FIX(VAR17=1,0.35,0.45,0,VAR20),COLORCYAN,LINETHICK5;
VAR24:=IF(DATE<=1590301,1,0);
VAR25:=BETWEEN(CLOSE*VAR24/(SUM(AMOUNT,BARSCOUNT(CLOSE*VAR24))/SUM(VOL*100,BARSCOUNT(CLOSE*VAR24))),1.05,0.95);
VAR26:=IF(VAR25=0,MA(CLOSE*VAR24,BARSCOUNT(CLOSE*VAR24)),SUM(AMOUNT,BARSCOUNT(CLOSE*VAR24))/SUM(VOL*100,BARSCOUNT(CLOSE*VAR24)));
VAR27:=CROSS(EMA(CLOSE/VAR26,120),1.02);
VAR28:=CROSS(EMA(CLOSE/VAR26,120),1.04);
DRAWTEXT(CROSS(EMA(CLOSE/VAR26,120),1.0029),机构买*1.01,10),COLORWHITE;
DRAWICON(CROSS(EMA(CLOSE/VAR26,120),1.0029),机构买*0.95,9);
DRAWTEXT(CROSS(EMA(CLOSE/VAR26,120),1.08),机构买*1.015,11),COLORYELLOW;
DRAWTEXT(CROSS(EMA(CLOSE/VAR26,120),1.04),机构买*1.02,12),COLORYELLOW;
DRAWICON(CROSS(EMA(CLOSE/VAR26,120),1.04),机构买*1.015,9);
{股民学院 www.58188.com 整理}



3、抓板资金监控

{公式名称: 抓板资金监控
画线方法: 副图}
VAR1:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
VAR2:=REF(EMA(VAR1,3),1);
VAR3:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VAR4:=IF(CLOSE>OPEN,VAR3*(HIGH-LOW),IF(CLOSE<OPEN,VAR3*(HIGH-OPEN+(CLOSE-LOW)),VOL/2))+IF(CLOSE>OPEN,0-VAR3*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR3*(HIGH-LOW),0-VOL/2));
VAR5:=VOL/CAPITAL;
VAR6:=IF(VAR5>10,10,VAR5);
VAR7:=VAR4/20/1.15;
VAR8:=VAR7*0.55+REF(VAR7,1)*0.33+REF(VAR7,2)*0.22;
VAR9:=EMA(VAR8,8);
VAR10:=EMA(VAR8,3);
STICKLINE(VAR7*0.4>=0,VAR7*0.4+VAR10,0,3,0),COLORYELLOW;
STICKLINE(VAR7*0.4<0,VAR7*0.4+VAR10,0,3,0),COLORGREEN;
VAR11:=IF(VAR7*0.4+VAR10>0,VAR7*0.4+VAR10,DRAWNULL);
VAR12:=IF(VAR7*0.4+VAR10<0,VAR7*0.4+VAR10,DRAWNULL);
VAR13:=VAR7*0.4+VAR10;
VAR14:=AMOUNT/10000;
资金净进出:IF(VAR7*0.4+VAR10>0,VAR11,VAR12),POINTDOT,COLORWHITE;
进出比例%:IF(VAR7*0.4+VAR10>0,VAR11/VAR14*100,VAR12/VAR14*100),COLORYELLOW;
VAR15:=VAR10;
STICKLINE(VAR15>0,VAR15,0,3,0),COLORRED;
STICKLINE(VAR15<0,VAR15,0,3,0),COLORFF3300;
VAR16:=REF(VAR12,1)<0 AND VAR11>30 AND CLOSE>OPEN AND CLOSE>REF(CLOSE,1) AND CLOSE>MA(CLOSE,3);
VAR17:=(3*CLOSE+2*LOW+OPEN+HIGH)/7;
VAR18:=(20*VAR17+19*REF(VAR17,1)+18*REF(VAR17,2)+17*REF(VAR17,3)+16*REF(VAR17,4)+15*REF(VAR17,5)+14*REF(VAR17,6)+13*REF(VAR17,7)+12*REF(VAR17,8)+11*REF(VAR17,9)+10*REF(VAR17,10)+9*REF(VAR17,11)+8*REF(VAR17,12)+7*REF(VAR17,13)+6*REF(VAR17,14)+5*REF(VAR17,15)+4*REF(VAR17,16)+3*REF(VAR17,17)+2*REF(VAR17,18)+REF(VAR17,20))/210;
VAR19:=VAR11>300 AND CROSS(CLOSE,VAR18);
DRAWTEXT(VAR16,(-30),13),COLORMAGENTA;
DRAWTEXT(VAR19,VAR7*0.4*1.5*1.4,13),COLORRED;


上一篇:通达信源码精选:王者归来,决策生命线,经典成交量

下一篇:通达信源码精选:天石永红 第三代-量价突破+波段公式