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

通达信源码:超好用的波段副图,棒棒糖买卖,分时至尊主图

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

超好用的波段副图:

STICKLINE(C>0.1,0,100,4.8,0),COLOR668800;
STICKLINE(C>0.1,-5,0,4.8,0),COLORFFB06C;
VAR1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
火:=BARSLAST(EMA(CLOSE,5)<REF(EMA(CLOSE,5),1)),NODRAW;
山:=COUNT(EMA(CLOSE,5)>REF(EMA(CLOSE,5),1),5),NODRAW;
KL:=IF(山>0,2*火,0);
趋势:=KL/2,COLOREE687B,NODRAW;
VARL1:=(EMA(C,12)-EMA(C,26))*100+50;
VARL2:=EMA(VARL1,9);
VARL3:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;
VARL4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
VARL5:=SMA(VARL4,13,8);
VARL6:=SMA(VARL3,21,8);
低位线:=IF((趋势-VARL6<(-70)),0,-5);
DRAWBAND(低位线,RGB(00,300,150),-5,RGB(00,300,150));
QS:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
高位线:=IF((QS-VARL6>85),0,-5);
DRAWBAND(高位线,RGB(255,20,147),-5,RGB(255,20,147));
K1:EMA(VAR2,5),COLORLIBLUE,NODRAW;
K2:SMA(VAR2,5,1),COLORYELLOW,NODRAW;
K:EMA((K1-K2),2),COLORWHITE,NODRAW;
DRAWBAND(85,RGB(100,100,100),85+K,RGB(128,00,00));
KK1:=IF(K>12,90,85),COLORCYAN;
KK2:=IF(K<-12,80,85),COLORCYAN;
DRAWBAND(KK1,RGB(200,200,200),KK2,RGB(200,200,200));
DRAWBAND(K1,RGB(400,200,00),K2,RGB(50,300,100));
STICKLINE(C>0.1,15,15,1,0),COLORCYAN;
STICKLINE(C>0.1,50,50,1,0),COLORCYAN;
LC:=REF(CLOSE,1);
VAR01:=C-REF(C,1);
VAR02:=100*EMA(EMA(VAR01,6),6)/EMA(EMA(ABS(VAR01),6),6);
MA5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),0),COLOR00FF00;
BT:=(LLV(VAR02,2)=LLV(VAR02,7) AND COUNT(VAR02<0,2) AND CROSS(VAR02,MA(VAR02,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
STICKLINE(BT,85,100,2,0),COLOR000088;
STICKLINE(BT,85,100,1,0),COLOR0000CC;
STICKLINE(BT,85,100,0.22,0),COLOR0000FF;
TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;
STICKLINE(TJ1,85,95,3,0),COLOR880088;
STICKLINE(TJ1,85,95,1.5,0),COLORAA00AA;
STICKLINE(TJ1,85,95,0.8,0),COLORCC00CC;
STICKLINE(TJ1,85,95,0.2,0),COLORFF00FF;
{分析家公式网 www.70822.com}
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;
STICKLINE(TJ2,85,90,4,0),COLOR008888;
STICKLINE(TJ2,85,90,2,0),COLOR00AAAA;
STICKLINE(TJ2,85,90,1,0),COLOR00CCCC;
STICKLINE(TJ2,85,90,0.2,0),COLOR00FFFF;
{HZ_买底1}
A8:=100*EMA(EMA((C-REF(C,1)),6),6)/EMA(EMA(ABS((C-REF(C,1))),6),6);
UP1:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),H=HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),0);
DOWN1:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),L=LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),0);
买1:=IF((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1),DRAWNULL,100);
卖:=IF(DOWN = UP AND DOWN<REF(UP,1) AND CROSS(MA(A8,2),A8), DRAWNULL,100);
STICKLINE(买1=100,0,5,4,0),COLOR00AAAA;
STICKLINE(买1=100,0,5,2.5,0),COLOR00CCCC;
STICKLINE(买1=100,0,5,0.5,0),COLOR00FFFF;
 
STICKLINE(卖,85,100,2,0),COLOR006600;
STICKLINE(卖,85,100,1,0),COLOR009900;
STICKLINE(卖,85,100,0.22,0),COLOR00CC00;




棒棒糖买卖:

AA:4*SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,5,1)-  
3*SMA(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,5,1),3.2,1),COLORRED,LINETHICK2; 
A1:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
A2:=SMA(A1,8,1);
A3:=SMA(A2,8,1);
BB:3*A2-2*A3,COLORYELLOW,LINETHICK2;
DRAWICON(CROSS(AA,BB),AA-4,23);
DRAWICON(CROSS(BB,AA),BB+4,15);
警戒线:90,COLOR00FF00;
关注线:10,COLORFF00FF;
STICKLINE( CROSS(AA,BB), -20,30,1,0),COLORRED,LINETHICK2;
DRAWICON(CROSS(AA,BB),30,13);
STICKLINE(CROSS(BB,AA),70,120,1,0),COLOR00FF00,LINETHICK2;
DRAWICON(CROSS(BB,AA),70,14);
IF(AA<10,-10,-20),COLORFFFFFF;
DRAWICON(AA>90,115,2);
IF(AA>=90,110,120),COLORFF00FF;
DRAWICON(AA<10,-15,1);



分时至尊主图:

分享一个通达信分时公式, 超级精品 ------- 分时至尊( 顶尖财经 股票学院: http://www.58188.com )

公式源码

日:=500;昨前:=60;高:=REF(HHV(H,日),昨前);

低:=REF(LLV(L,日),昨前);

H1:=高-(高-低)*1;H2:=高-(高-低)*0.91;

H3:=高-(高-低)*0.85;H4:=高-(高-低)*0.809;

H5:=高-(高-低)*0.777;H6:=高-(高-低)*0.707;

H7:=高-(高-低)*0.666;H8:=高-(高-低)*0.618;

H9:=高-(高-低)*0.563;H10:=高-(高-低)*0.5;

H11:=高-(高-低)*0.424;

H12:=高-(高-低)*0.382;

H13:=高-(高-低)*0.309;

H14:=高-(高-低)*0.25;

H15:=高-(高-低)*0.191;

H16:=高-(高-低)*0.1375;

H17:=高-(高-低)*0.0807;

一:REFDATE(H2,DATE),COLORLIBLUE,DOTLINE;

二:=REFDATE(H3,DATE),COLORYELLOW;

三:=REFDATE(H4,DATE),COLORLIBLUE;

四:=REFDATE(H5,DATE),COLORLIRED;

五:=REFDATE(H6,DATE),COLORYELLOW;

六:=REFDATE(H7,DATE),COLORLIBLUE;

七:REFDATE(H8,DATE),,DOTLINE,COLORGRAY;

八:=REFDATE(H9,DATE),COLORYELLOW;

九:=REFDATE(H10,DATE),COLORLIBLUE;

十:=REFDATE(H11,DATE),COLORLIRED;

十一:=REFDATE(H12,DATE),COLORYELLOW;

十二:=REFDATE(H13,DATE),COLORLIBLUE;

十三:=REFDATE(H14,DATE),COLORLIRED;

十四:=REFDATE(H15,DATE),COLORYELLOW;

十五:=REFDATE(H16,DATE),COLORLIBLUE;

十六:REFDATE(H17,DATE),COLORYELLOW,DOTLINE;

底:REFDATE(H1,DATE),COLORLIGREEN;顶:

REFDATE(高,DATE),COLORLIRED;

DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

买:=CROSS(C,一);

卖:=CROSS(十六,C);

DRAWICON(买,底,1);

DRAWICON(卖,顶,2);

N:=3;FF:=(C-REF(C,N))/REF(C,N);

AH1:=MAX(DYNAINFO(3),DYNAINFO(5));

AL1:=MIN(DYNAINFO(3),DYNAINFO(6));

AP1:=AH1-AL1;阻力:=AL1+AP1*7/8;

支撑:=AL1+AP1*0.5/8;

现价:=CLOSE;DRAWTEXT(LONGCROSS(支撑,现价,2),C*0.999,'买'),COLORCYAN;

DRAWTEXT(LONGCROSS(现价,阻力,2),C*1.004,' 卖'),COLORMAGENTA;

DRAWICON(LONGCROSS(现价,阻力,2),C*1.002,15);

TT:=BARSCOUNT(CLOSE);CC:=CLOSE;

均线:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0)));

上均:=(均线*1.007 );

下均:=(均线/1.005 );

时长:=IF(HOUR>=10 AND HOUR<15,1,0);

涨幅:=(CLOSE>DYNAINFO(3))>1.02;

跌幅:=(CLOSE/DYNAINFO(3))<0.98;

横盘:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/CLOSE)<0.03;

YY:=SMA(VOL,30,1);

放量:=SUM(VOL,6)>REF(MA(VOL,30),1)*0.03;

涨跌幅:=涨幅 OR 跌幅;

横涨:=横盘 AND 放量 AND (C>上均);

DRAWTEXT(FILTER(横涨,50),均线*0.995,' 突破'),COLORLIRED;

DRAWICON(FILTER(横涨,50),均线*0.995,26);MA30:=EMA(CLOSE,30);

A2:=DYNAINFO(3);

A3:=IF(C=A2,C*1.005,IF(C<A2,C*1.005,C*0.995));

A5:=IF(C=A2,CON2STR(0,2),IF(C>A2,CON2STR((C-A2)/A2*100,2),CON2STR((A2-C)/A2*100,2)));

A6:=IF(ZTPRICE(DYNAINFO(3),0.1)=C OR DTPRICE(DYNAINFO(3),0.1)=C,STRCAT(CON2STR(C,2),'★ '),IF(C=REF(C,1),STRCAT(CON2STR(C,2),'◆ '),IF(C>REF(C,1),STRCAT(CON2STR(C,2),'▲ '),STRCAT(CON2STR(C,2),' '))));

A4:=STRCAT(STRCAT(' ',A6),STRCAT(A5,'%'));

分时最高价:=REF(HHV(HIGH,240),1);

分时最低价:=REF(LLV(LOW,240),1);

A7:=IF(DYNAINFO(3)>C,0.9973,1.0027);

DRAWTEXT(CURRBARSCOUNT=240,C*A7,'');

DRAWTEXT(ISLASTBAR AND C>A2 ,C*1,A4),COLOR3333FF;

DRAWTEXT(ISLASTBAR AND C=A2 ,C*1,A4),COLORWHITE;

DRAWTEXT(ISLASTBAR AND C<A2 ,C*1,A4),COLOR42C800;

WA1:=V*C/100;WA2:=SUM((IF(((WA1/8>20) AND (CLOSE>(REF(CLOSE,1)))),WA1,0)),0);

WA3:=SUM((IF(((WA1/8>20) AND (CLOSE<(REF(CLOSE,1)))),WA1,0)),0);

WA4:=SUM((IF(((WA1/8<20) AND (CLOSE>(REF(CLOSE,1)))),WA1,0)),0);

WA5:=SUM((IF(((WA1/8<20) AND (CLOSE<(REF(CLOSE,1)))),WA1,0)),0);

机构买盘:=(WA2);机构卖盘:=(WA3);散户买盘:=(WA4);散户卖盘:=(WA5);

DRAWTEXT_FIX(1,0.730,1-0.088,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),' 万')),COLORRED;

DRAWTEXT_FIX(1,0.730,1-0.001,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),' 万')),COLORGREEN;

DRAWTEXT_FIX(1,0.860,1-0.088,0,STRCAT(STRCAT('【散户买盘】',CON2STR(散户买盘,2)),' 万')),COLORMAGENTA;

DRAWTEXT_FIX(1,0.860,1-0.001,0,STRCAT(STRCAT('【散户卖盘】',CON2STR(散户卖盘,2)),' 万')),COLORCYAN;

QA1:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),-VOL/CAPITAL*100,0)),0);

成交额:=V*C/100,NODRAW;{万元}QA4:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);

QA2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);

QA3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);

QA5:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);

QA6:=((QA2+QA3)+QA4)+QA5;QA7:=IF((ISLASTBAR),((100*QA2)/QA6),0);

QA8:=IF((ISLASTBAR),((100*QA3)/QA6),0);

QA9:=IF((ISLASTBAR),((100*QA4)/QA6),0);

QA10:=IF((ISLASTBAR),((100*QA5)/QA6),0);

机构买:=(QA2);机构卖:=(QA3);

机构进出:=机构买-机构卖;DD1:=1;

AAA1:=STRCAT(STRCAT('机构买入 ',CON2STR((100*QA2)/QA6,0)),'%');

AAA2:=STRCAT(STRCAT('机构卖出 ',CON2STR((100*QA3)/QA6,0)),'%');

AAA0:=STRCAT(STRCAT('机构总买入 ',CON2STR((100*(QA2-QA3))/A6,0)),'%');

AAA3:=STRCAT(STRCAT('散户买入 ',CON2STR((100*QA4)/QA6,0)),'%');

AAA4:=STRCAT(STRCAT('散户卖出 ',CON2STR((100*QA5)/QA6,0)),'%');

AAA5:=STRCAT(STRCAT('散户总买入 ',CON2STR((100*(QA4-QA5))/QA6,0)),'%');

DRAWTEXT_FIX(DD1=1,0.001,0.150,0,AAA1),COLORRED;DRAWTEXT_FIX(DD1=1,0.001,0.200,0,AAA2),COLORGREEN;

DRAWTEXT_FIX(DD1=1,0.001,0.255,0,AAA3),COLORMAGENTA;DRAWTEXT_FIX(DD1=1,0.001,0.305,0,AAA4),COLORCYAN;

DRAWTEXT_FIX(DD1=1,0.001,0.360,0,AAA0),COLORYELLOW;DRAWTEXT_FIX(DD1=1,0.001,0.410,0,AAA5),COLORWHITE;

上一篇:通达信源码:追涨新风尚,主浪收阴追涨快买,股票基本面评估副图指标

下一篇:通达信源码:智勇出击大胜,抄底王和黑马拉升