公司基本面指标可与任何通达信主图叠加通达信公式 源码附图
涨跌:=REF(C,1);
涨停:=IF((C-涨跌)*100/涨跌>=(10-0.01*100/涨跌),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORRED;
STICKLINE(涨停,H,L,0,0),COLORRED;
跌停:=IF((涨跌-C)*100/涨跌>=(10-0.01*100/涨跌),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLOR808000;
换手:HSL.HSL,NODRAW;
成交量:VOL/10000,NODRAW;
昨日成交额:REF(AMOUNT/100000000,1),NODRAW;{亿元}
今日成交额:AMOUNT/100000000,NODRAW;
ZTCS:=COUNT(涨停,BARSLAST(涨停+1));
DRAWTEXT_FIX(FINANCE(3)=3||FINANCE(3)=4,0,0.37,0,STRCAT('涨停价: ',VAR2STR(ZTPRICE(REF(C,1),0.2),2)));
DRAWTEXT_FIX(FINANCE(3)=3||FINANCE(3)=4,0,0.42,0,STRCAT('跌停价: ',VAR2STR(DTPRICE(REF(C,1),0.2),2)));
DRAWTEXT_FIX(FINANCE(3)=1||FINANCE(3)=2,0,0.37,0,STRCAT('涨停价: ',VAR2STR(ZTPRICE(REF(C,1),0.1),2)));
DRAWTEXT_FIX(FINANCE(3)=1||FINANCE(3)=2,0,0.42,0,STRCAT('跌停价: ',VAR2STR(DTPRICE(REF(C,1),0.1),2)));
开盘价:OPEN,NODRAW;
最高价:HIGH,NODRAW;
最低价:LOW,NODRAW;
板块上涨家:HY_INDEXADV,NODRAW;
板块下跌家:HY_INDEXDEC,NODRAW;
{涨跌停家数}
涨停数:"880006$C",NODRAW;
跌停数:"880006$O",NODRAW;
GZT1:=STRCAT(' 共涨停: ',CON2STR(ZTCS,0));
GZT2:=STRCAT(GZT1,'次');
SSTS1:=STRCAT(' 上市: ',CON2STR(FINANCE(42),0));
SSTS2:=STRCAT(SSTS1,'天');
NTZZT1:=STRCAT(' 距今:',CON2STR(CONST(BARSLAST(涨停)),0));
NTZZT2:=STRCAT(NTZZT1,'天有涨停');
ZTTJ1:=STRCAT(SSTS2,GZT2);
ZTTJ2:=STRCAT(ZTTJ1,NTZZT2);
ZTTJ:=STRCAT('涨停统计:',ZTTJ2);
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0.33,0,ZTTJ),COLORYELLOW;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(涨停)),REF(HIGH,BARSLAST(涨停)),0.1,0),COLORDDDD00;
STICKLINE(CLOSE,REF(LOW,BARSLAST(涨停)),REF(LOW,BARSLAST(涨停)),0.1,0),COLOR00DDDD;
竞价额:=DYNAINFO(15)/10000;{万元}
DRAWTEXT_FIX(C>0,0.00,0.46,0,VARCAT(VARCAT('竞价: ',VAR2STR(竞价额,0)),' 万')),
COLORMAGENTA;
CJE:=VOL*C/100,NODRAW;
主题1:=STRCAT('【主题投资】:',EXTERNSTR(0,1));
主营1:=STRCAT('【主营业务】:',EXTERNSTR(0,2));
主题和主营1:=STRCAT(主营1,' ■■ ');
主题和主营2:=STRCAT(主题和主营1,主题1);
主题和主营3:=STRCAT(STRCAT(STRCAT(STRCAT('【行业信息】:',HYBLOCK),' ■■ '),主题和主营2),'');
DRAWTEXT_FIX(1,0.95,0.98,1,主题和主营3),COLOR00FFFF;
TJ:=ISLASTBAR AND C<500;
DRAWTEXT_FIX(TJ,0.005,0.04,0,FGBLOCK),COLORGREEN;
所属板块:=STRCAT('所属板块: ',STRCAT(STRCAT(STRCAT('[行业]-',HYBLOCK),STRCAT(' [地域]-',DYBLOCK)),STRCAT(' [概念]-',GNBLOCK)));
主收同比:=STRCAT(' 主收同比: ',CON2STR(FINANCE(44),2));
市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));
市销率:=STRCAT(' 市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2));
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
净利润率:=STRCAT(' 净利润率: ',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
现金流:=STRCAT(' 现金流: ',CON2STR(FINANCE(25)/FINANCE(1),2));
利润同比:=STRCAT(' 利润同比: ',CON2STR(FINANCE(43),2));
DRAWTEXT_FIX(ISLASTBAR,0.003,0.11,0,市盈率);
DRAWTEXT_FIX(ISLASTBAR,0,0.14,0,市销率);
DRAWTEXT_FIX(ISLASTBAR,0,0.17,0,市净率);
DRAWTEXT_FIX(ISLASTBAR,0,0.21,0,毛利率);
DRAWTEXT_FIX(ISLASTBAR,0.1,0.21,0,现金流);
DRAWTEXT_FIX(ISLASTBAR,0.1,0.11,0,主收同比);
DRAWTEXT_FIX(ISLASTBAR,0.1,0.14,0,净利润率);
DRAWTEXT_FIX(ISLASTBAR,0.1,0.17,0,利润同比);
{业绩}
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(29)/FINANCE(19)*100,2));
主营利润率:=STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
当前业绩:=STRCAT('当前业绩: ',STRCAT(STRCAT(净资收益率,毛利率),主营利润率));
{主图显示}
DRAWTEXT_FIX(ISLASTBAR,0.005,0.00,0,所属板块),COLOR00C0C0;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.07,0,当前业绩),COLOR00C0C0;
总额:=AMOUNT;
买:=IF(O=C AND (C-REF(C,1))/REF(C,1)*100>9.8,AMOUNT,AMOUNT/((H-L)*2-ABS(O-C))*(C-L));
买%:=买/AMOUNT*100;
流入:=AMOUNT*买%/10000000000;
流出:=AMOUNT/100000000-流入;
净流:=(流入-流出);
总额3:=SUM(AMOUNT,3);
流入3:=SUM(流入,3);
流出3:=SUM(流出,3);
净流3:=SUM(流入-流出,3);
总额5:=SUM(AMOUNT,5);
流入5:=SUM(流入,5);
流出5:=SUM(流出,5);
净流5:=SUM(流入-流出,5);
总额10:=SUM(AMOUNT,10);
流入10:=SUM(流入,10);
流出10:=SUM(流出,10);
净流10:=SUM(流入-流出,10);
画:=CONST(FINDHIGH(总额10,0,190,1));
DRAWTEXT_FIX(1,0.71,0.07,0,'净流(亿):'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.78,0.05,0,'1日'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.83,0.05,0,'3日'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.88,0.05,0,'5日'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.93,0.05,0,'10日'),COLOR8080FF,COLORWHITE;
DRAWNUMBER_FIX(1,0.78,0.10,0,CONST((净流))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.83,0.10,0,CONST((净流3))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.88,0.10,0,CONST((净流5))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.93,0.10,0,CONST((净流10))),COLORYELLOW;
股东人数:=FINANCE(8);
人均持股:=ROUND(FINANCE(7)/FINANCE(8));
DRAWTEXT_FIX(1,0.05,0.24,1,'股东人数:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.05,0.28,1,'人均持股:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.08,0.24,1,股东人数),COLORWHITE;
DRAWNUMBER_FIX(1,0.08,0.28,1,人均持股),COLORWHITE;
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替}
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X1+X2+X3+X4+X5;
DRAWTEXT_FIX(1,0.85,0.01,1,'财务预警:'),COLORRED;
DRAWTEXT_FIX(Z值<1.2,0.838,0.11,1,' ●重 警●'),COLORLIRED;
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.838,0.11,1,' ○轻 警○'),COLOR0099FF;
DRAWTEXT_FIX(Z值>2.6,0.838,0.11,1,' ◎无 警◎'),COLORLIGREEN;
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
该公式包含未来函数:DHIGH
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
涨跌赋值:1日前的C
涨停赋值:IF((C-涨跌)*100/涨跌>=(10-0.01*100/涨跌),1,0)
当满足条件涨停时,在开盘价和收盘价之间画柱状线
当满足条件涨停时,在H和L之间画柱状线
跌停赋值:IF((涨跌-C)*100/涨跌>=(10-0.01*100/涨跌),1,0)
当满足条件跌停时,在开盘价和收盘价之间画柱状线
输出换手:HSL.HSL,NODRAW
输出成交量:成交量/10000,NODRAW
输出昨日成交额:1日前的成交额/100000000,NODRAW
输出{亿元}
今日成交额:成交额/100000000,NODRAW
ZTCS赋值:COUNT(涨停,上次涨停+1距今天数)
DRAWTEXT_FIX(FINANCE(3)=3||FINANCE(3)=4,0,0.37,0,STRCAT('涨停价: ',VAR2STR(ZTPRICE(1日前的C,0.2),2)))
DRAWTEXT_FIX(FINANCE(3)=3||FINANCE(3)=4,0,0.42,0,STRCAT('跌停价: ',VAR2STR(DTPRICE(1日前的C,0.2),2)))
DRAWTEXT_FIX(FINANCE(3)=1||FINANCE(3)=2,0,0.37,0,STRCAT('涨停价: ',VAR2STR(ZTPRICE(1日前的C,0.1),2)))
DRAWTEXT_FIX(FINANCE(3)=1||FINANCE(3)=2,0,0.42,0,STRCAT('跌停价: ',VAR2STR(DTPRICE(1日前的C,0.1),2)))
输出开盘价:开盘价,NODRAW
输出最高价:最高价,NODRAW
输出最低价:最低价,NODRAW
输出板块上涨家:HY_INDEXADV,NODRAW
输出板块下跌家:HY_INDEXDEC,NODRAW
{涨跌停家数}
涨停数:"880006$C",NODRAW
跌停数:"880006$O",NODRAW
GZT1:=STRCAT(' 共输出涨停: ',CON2STR(ZTCS,0))
GZT2赋值:STRCAT(GZT1,'次')
SSTS1:=STRCAT(' 上市: ',CON2STR(FINANCE(42),0))
SSTS2赋值:STRCAT(SSTS1,'天')
NTZZT1:=STRCAT(' 距今:',CON2STR(CONST(上次涨停距今天数),0))
NTZZT2赋值:STRCAT(NTZZT1,'天有涨停')
ZTTJ1赋值:STRCAT(SSTS2,GZT2)
ZTTJ2赋值:STRCAT(ZTTJ1,NTZZT2)
ZTTJ赋值:STRCAT('涨停统计:',ZTTJ2)
当满足条件 到最后交易的周期=1时,在横轴0纵轴0.33位置书写文字
STICKLINE(收盘价,REF(最高价,上次涨停距今天数),REF(最高价,上次涨停距今天数),0.1,0),COLORDDDD00
STICKLINE(收盘价,REF(最低价,上次涨停距今天数),REF(最低价,上次涨停距今天数),0.1,0),COLOR00DDDD
竞价额赋值:开盘金额/10000
输出{万元}
DRAWTEXT_FIX(C>0,0.00,0.46,0,VARCAT(VARCAT('竞价: ',VAR2STR(竞价额,0)),' 万')),
画洋红色
CJE赋值:成交量*C/100,NODRAW
主题1赋值:STRCAT('【主题投资】:',EXTERNSTR(0,1))
主营1赋值:STRCAT('【主营业务】:',EXTERNSTR(0,2))
主题和主营1赋值:STRCAT(主营1,' ■■ ')
主题和主营2赋值:STRCAT(主题和主营1,主题1)
主题和主营3赋值:STRCAT(STRCAT(STRCAT(STRCAT('【行业信息】:',HYBLOCK),' ■■ '),主题和主营2),'')
当满足条件1时,在横轴0.95纵轴0.98位置书写文字
TJ赋值:ISLASTBAR AND C<500
当满足条件TJ时,在横轴0.005纵轴0.04位置书写文字
所属板块:=STRCAT('所属板块: ',STRCAT(STRCAT(STRCAT('[行业]-',HYBLOCK),STRCAT(' [地域]-',DYBLOCK)),STRCAT(' [概念]-',GNBLOCK)))
主收同比:=STRCAT(' 主收同比: ',CON2STR(FINANCE(44),2))
市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2))
市销率:=STRCAT(' 市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2))
市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2))
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2))
净利润率:=STRCAT(' 净利润率: ',CON2STR(FINANCE(30)/FINANCE(20)*100,2))
现金流:=STRCAT(' 现金流: ',CON2STR(FINANCE(25)/FINANCE(1),2))
利润同比:=STRCAT(' 利润同比: ',CON2STR(FINANCE(43),2))
当满足条件ISLASTBAR时,在横轴0.003纵轴0.11位置书写文字
当满足条件ISLASTBAR时,在横轴0纵轴0.14位置书写文字
当满足条件ISLASTBAR时,在横轴0纵轴0.17位置书写文字
当满足条件ISLASTBAR时,在横轴0纵轴0.21位置书写文字
当满足条件ISLASTBAR时,在横轴0.1纵轴0.21位置书写文字
当满足条件ISLASTBAR时,在横轴0.1纵轴0.11位置书写文字
当满足条件ISLASTBAR时,在横轴0.1纵轴0.14位置书写文字
当满足条件ISLASTBAR时,在横轴0.1纵轴0.17位置书写文字
{业绩}
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(29)/FINANCE(19)*100,2))
主营利润率赋值:STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2))
当前业绩:=STRCAT('当前业绩: ',STRCAT(STRCAT(净资收益率,毛利率),主营利润率))
当满足条件ISLASTBAR时,在横轴0.005纵轴0.00位置书写文字
当满足条件ISLASTBAR时,在横轴0.005纵轴0.07位置书写文字
总额赋值:成交额
买赋值:IF(O=C AND (C-1日前的C)/1日前的C*100>9.8,成交额,成交额/((H-L)*2-O-C的绝对值)*(C-L))
买%:=买/成交额*100
流入赋值:成交额*买%/10000000000
流出赋值:成交额/100000000-流入
净流赋值:(流入-流出)
总额3:=3的成交额日累和
流入3:=3的流入日累和
流出3:=3的流出日累和
净流3:=3的流入-流出日累和
总额5:=5的成交额日累和
流入5:=5的流入日累和
流出5:=5的流出日累和
净流5:=5的流入-流出日累和
总额10:=10的成交额日累和
流入10:=10的流入日累和
流出10:=10的流出日累和
净流10:=10的流入-流出日累和
画赋值:CONST(FIND最高价(总额10,0,190,1))
DRAWTEXT_FIX(1,0.71,0.07,0,'净流(亿):'),COLOR8080FF,画白色
当满足条件1时,在横轴0.78纵轴0.05位置书写文字
当满足条件1时,在横轴0.83纵轴0.05位置书写文字
当满足条件1时,在横轴0.88纵轴0.05位置书写文字
当满足条件1时,在横轴0.93纵轴0.05位置书写文字
DRAWNUMBER_FIX(1,0.78,0.10,0,CONST((净流))),画黄色
DRAWNUMBER_FIX(1,0.83,0.10,0,CONST((净流3))),画黄色
DRAWNUMBER_FIX(1,0.88,0.10,0,CONST((净流5))),画黄色
DRAWNUMBER_FIX(1,0.93,0.10,0,CONST((净流10))),画黄色
股东人数赋值:FINANCE(8)
人均持股赋值:ROUND(FINANCE(7)/FINANCE(8))
当满足条件1时,在横轴0.05纵轴0.24位置书写文字
当满足条件1时,在横轴0.05纵轴0.28位置书写文字
当满足条件1时,在横轴0.08纵轴0.24位置书写数字
当满足条件1时,在横轴0.08纵轴0.28位置书写数字
X1赋值:(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2
X2赋值:(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4
{盈余公积用资本公积金代替}
X3赋值:FINANCE(23)/FINANCE(10)*3.3
X4赋值:FINANCE(19)/FINANCE(15)*0.6
{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999
Z值赋值:X1+X2+X3+X4+X5
当满足条件1时,在横轴0.85纵轴0.01位置书写文字
当满足条件Z值<1.2时,在横轴0.838纵轴0.11位置书写文字
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.838,0.11,1,' ○轻 警○'),COLOR0099FF
当满足条件Z值>2.6时,在横轴0.838纵轴0.11位置书写文字