通达信异动捉涨停分时主图指标 源码分享 附图
所属板块:=STRCAT('【所属板块】',STRCAT(STRCAT(STRCAT(' [行业]—',HYBLOCK),STRCAT(' [地域]—',DYBLOCK)),STRCAT(' [概念]—',GNBLOCK)));
DRAWTEXT_FIX(ISLASTBAR,0.005,0.05,0,所属板块),COLORWHITE;
主力大单1:=MAX(DYNAINFO(3),DYNAINFO(5));
主力大单2:=MIN(DYNAINFO(3),DYNAINFO(6));
主力大单3:=主力大单1-主力大单2;
主力大单4:=(主力大单1+主力大单2)/1;
支撑:主力大单2+主力大单3*1/8,POINTDOT,COLORMAGENTA;
支撑1:主力大单2+主力大单3*0.5/8,POINTDOT;
御祥底参考:主力大单2+主力大单3/3,POINTDOT,COLORBLUE;
DRAWTEXT_FIX(1,0.01,0.01,0,4),COLORCYAN;
STICKLINE(CLOSE< 支撑,支撑,CLOSE,2,0),COLORRED;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
支撑A:=L1+P1*0.5/8,COLORMAGENTA;
DRAWTEXT(LONGCROSS(支撑A,C,2),C,'买'),COLORYELLOW,LINETHICK4;
资金万:=AMO/10000;
资金1:=资金万>500 AND 资金万< 1000;
资金2:=资金万>1000;
TXT:=VARCAT(VAR2STR(资金万/1000,1),'亿');
DRAWTEXT(资金1 AND C>REF(C,1),C,'O'),COLORRED;
DRAWTEXT(资金1 AND C< REF(C,1),C,'O'),COLORGREEN;
DRAWTEXT(资金2 AND C>REF(C,1),C,TXT),COLORRED;
DRAWTEXT(资金2 AND C< REF(C,1),C,TXT),COLORGREEN;
DRAWTEXT_FIX(1,0.0,0.003,0,'★圆圈是1:【单笔资金大于5百万小于1亿】+【大于1亿显示金额】+【红色主动买】 +【绿色主动卖】;
【--红色低吸买】!!!'),COLORYELLOW,LINETHICK2;
主力攻击量:=((HSL*0.50+REF(HSL,1)*0.33)+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPEN;
主力攻击量A:=SUM(IF(C>REF(C,1),主力攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0;
主力攻击量B:=-SUM(IF(C< REF(C,1),主力攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0;
攻击流量:=主力攻击量A+主力攻击量B,COLORSTICK;
DRAWTEXT_FIX(1,0.75,0.92,0,' '),COLORYELLOW;
攻击比:=攻击流量/SUM(V,FROMOPEN)*100,COLORRED,LINETHICK1;
资金攻击:=IF(攻击比>=0,(攻击比+50),100-ABS((攻击比-50)));
资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),STICK,COLORRED;
资金流出:=-SUM(IF(C< REF(C,1),V,0),FROMOPEN),STICK,COLOR00FF00;
资金出入:=资金流入+资金流出,COLORSTICK;
资金比:=资金出入/SUM(V,FROMOPEN)*100,COLOR00FFFF,LINETHICK1;
资金流比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2));
DRAWTEXT_FIX(1,0.180,0.88,0,STRCAT(STRCAT('【资金流比】',CON2STR(资金流比,2)),'%买')),COLORYELLOW;
DRAWTEXT_FIX(1,0.000,0.88,0,STRCAT(STRCAT('【资金攻击】',CON2STR(资金攻击,2)),' %买')),COLORYELLOW;
A1:=(VOL/CLOSE)/3;
A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A3:=SUM((IF(((A1>40) AND (CLOSE< (REF(CLOSE,1)))),A1,0)),0);
A4:=SUM((IF(((A1< 40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A5:=SUM((IF(((A1< 40) AND (CLOSE< (REF(CLOSE,1)))),A1,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((BARSTATUS=2),((100*A2)/A6),0);
A8:=((IF((BARSTATUS=2),((100*A3)/A6),0)));
A9:=((IF((BARSTATUS=2),((100*A4)/A6),0)));
A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)));
机构买盘:=(A2),LINETHICK2;
机构卖盘:=(A3),LINETHICK2;
成交额:=V*C/100,NODRAW;
BA2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
BA3:=SUM((IF(((成交额/8>20) AND (CLOSE< (REF(CLOSE,1)))),成交额,0)),0);
BA6:=(BA2+BA3);
BA7:=IF((ISLASTBAR),((100*BA2)/BA6),0);
BA8:=IF((ISLASTBAR),((100*BA3)/BA6),0);
BAAA3:=STRCAT(STRCAT('总买入',CON2STR((100*(BA2-BA3))/BA6,0)),'%');
SSLB:=STRCAT(STRCAT('三日量比',CON2STR((VOL/FROMOPEN)/(MA(V,3)/240)*100,0)),'%');
DRAWTEXT_FIX(1,0,0.18,0,BAAA3),COLOR00FFFF;
DRAWTEXT_FIX(1,0,0.26,0,SSLB),COLORRED;
DRAWTEXT_FIX(1,0.0,1-0.05,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),'万')),COLORYELLOW;
DRAWTEXT_FIX(1,0.18,1-0.05,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),'万')),COLOR00FF00;
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
所属板块赋值:STRCAT('【所属板块】',STRCAT(STRCAT(STRCAT(' [行业]—',HYBLOCK),STRCAT(' [地域]—',DYBLOCK)),STRCAT(' [概念]—',GNBLOCK)))
当满足条件ISLASTBAR时,在横轴0.005纵轴0.05位置书写文字
主力大单1赋值:MAX(DYNAINFO(3),DYNAINFO(5))
主力大单2赋值:MIN(DYNAINFO(3),DYNAINFO(6))
主力大单3赋值:主力大单1-主力大单2
主力大单4赋值:(主力大单1+主力大单2)/1
输出支撑:主力大单2+主力大单3*1/8,POINTDOT,画洋红色
支撑1:主力大单2+主力大单3*0.5/8,POINTDOT
输出御祥底参考:主力大单2+主力大单3/3,POINTDOT, 画蓝色
当满足条件1时,在横轴0.01纵轴0.01位置书写文字
当满足条件收盘价< 支撑时,在支撑和收盘价之间画柱状线
H1赋值:MAX(DYNAINFO(3),DYNAINFO(5))
L1赋值:MIN(DYNAINFO(3),DYNAINFO(6))
P1赋值:H1-L1
支撑A:=L1+P1*0.5/8,画洋红色
DRAWTEXT(LONGCROSS(支撑A,C,2),C,'买'),画黄色,LINETHICK4
资金万赋值:AMO/10000
资金1赋值:资金万>500 AND 资金万< 1000
资金2赋值:资金万>1000
TXT赋值:VARCAT(VAR2STR(资金万/1000,1),'亿')
DRAWTEXT(资金1 AND C>1日前的C,C,'O'),画红色
DRAWTEXT(资金1 AND C< 1日前的C,C,'O'),画绿色
DRAWTEXT(资金2 AND C>1日前的C,C,TXT),画红色
DRAWTEXT(资金2 AND C< 1日前的C,C,TXT),画绿色
输出DRAWTEXT_FIX(1,0.0,0.003,0,'★圆圈是1:【单笔资金大于5百万小于1亿】+【大于1亿显示金额】+【红色主动买】 +【绿色主动卖】
【--红色低吸买】!!!'),画黄色, 线宽为2
主力攻击量赋值:((HSL*0.50+1日前的HSL*0.33)+(2日前的HSL*0.17))*FROM开盘价的C日累和/FROM开盘价
主力攻击量A:=SUM(IF(C>1日前的C,主力攻击量*V,0),FROM开盘价),COLOR0000FF,LINETHICK0
主力攻击量B:=-SUM(IF(C< 1日前的C,主力攻击量*V,0),FROM开盘价),COLOR00FF00,LINETHICK0
攻击流量赋值:主力攻击量A+主力攻击量B,COLORSTICK
当满足条件1时,在横轴0.75纵轴0.92位置书写文字
攻击比赋值:攻击流量/FROM开盘价的V日累和*100,画红色,LINETHICK1
资金攻击赋值:IF(攻击比>=0,(攻击比+50),100-(攻击比-50的绝对值))
资金流入赋值:SUM(IF(C>1日前的C,V,0),FROM开盘价),STICK,画红色
资金流出赋值:-SUM(IF(C< 1日前的C,V,0),FROM开盘价),STICK,COLOR00FF00
资金出入赋值:资金流入+资金流出,COLORSTICK
资金比赋值:资金出入/FROM开盘价的V日累和*100,COLOR00FFFF,LINETHICK1
资金流比赋值:IF(资金比>=0,(资金比+100)/2,100-(资金比-100的绝对值/2))
DRAWTEXT_FIX(1,0.180,0.88,0,STRCAT(STRCAT('【资金流比】',CON2STR(资金流比,2)),'%买')),画黄色
DRAWTEXT_FIX(1,0.000,0.88,0,STRCAT(STRCAT('【资金攻击】',CON2STR(资金攻击,2)),' %买')),画黄色
A1赋值:(成交量/收盘价)/3
A2赋值:SUM((IF(((A1>40) AND (收盘价>(1日前的收盘价))),A1,0)),0)
A3赋值:SUM((IF(((A1>40) AND (收盘价< (1日前的收盘价))),A1,0)),0)
A4赋值:SUM((IF(((A1< 40) AND (收盘价>(1日前的收盘价))),A1,0)),0)
A5赋值:SUM((IF(((A1< 40) AND (收盘价< (1日前的收盘价))),A1,0)),0)
A6赋值:((A2+A3)+A4)+A5
A7赋值:IF((BARSTATUS=2),((100*A2)/A6),0)
A8赋值:((IF((BARSTATUS=2),((100*A3)/A6),0)))
A9赋值:((IF((BARSTATUS=2),((100*A4)/A6),0)))
A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)))
机构买盘赋值:(A2), 线宽为2
机构卖盘赋值:(A3), 线宽为2
成交额赋值:V*C/100,NODRAW
BA2赋值:SUM((IF(((成交额/8>20) AND (收盘价>(1日前的收盘价))),成交额,0)),0)
BA3赋值:SUM((IF(((成交额/8>20) AND (收盘价< (1日前的收盘价))),成交额,0)),0)
BA6赋值:(BA2+BA3)
BA7赋值:IF((ISLASTBAR),((100*BA2)/BA6),0)
BA8赋值:IF((ISLASTBAR),((100*BA3)/BA6),0)
BAA4812552162621008843赋值:STRCAT(STRCAT('总买入',CON2STR((100*(BA2-BA3))/BA6,0)),'%')
SSLB赋值:STRCAT(STRCAT('三日量比',CON2STR((成交量/FROM开盘价)/(V的3日简单移动平均/240)*100,0)),'%')
当满足条件1时,在横轴0纵轴0.18位置书写文字
当满足条件1时,在横轴0纵轴0.26位置书写文字
DRAWTEXT_FIX(1,0.0,1-0.05,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),'万')),画黄色
DRAWTEXT_FIX(1,0.18,1-0.05,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),'万')),COLOR00FF00