通达信小白看盘幅图指标源码

创业板:=INBLOCK('创业板');
中小企业:=INBLOCK('中小企业');
上证A股:=INBLOCK('上证A股');
深证A股:=INBLOCK('深证A股');
INDEH:=IF(中小企业=1,"399005$H",IF(创业板=1,"399006$H",IF(上证A股=1,"999999$H","399001$H"))),NODRAW;
INDEO:=IF(中小企业=1,"399005$O",IF(创业板=1,"399006$O",IF(上证A股=1,"999999$O","399001$O"))),NODRAW;
INDEL:=IF(中小企业=1,"399005$L",IF(创业板=1,"399006$L",IF(上证A股=1,"999999$L","399001$L"))),NODRAW;
INDEC:=IF(中小企业=1,"399005$C",IF(创业板=1,"399006$C",IF(上证A股=1,"999999$C","399001$C"))),NODRAW;
DRAWKLINE(INDEH,INDEO,INDEL,INDEC);
板块:=IF(中小企业=1,'中小企业指数',IF(创业板=1,'创业板指数',IF(上证A股=1,'上证指数','深证指数')));
AA:=REF(INDEC,1);
指数涨幅:IF(AA>0,(INDEC-AA)*100/AA,0),NODRAW;
A:=STRCAT(板块,STRCAT(':',CON2STR(INDEC,2)));
DRAWTEXT_FIX(ISLASTBAR,0,0,0,A),COLOR0055FF;
上涨:=VARCAT('上涨:',VAR2STR(HY_INDEXADV,0));
下跌:=VARCAT('下跌:',VAR2STR(HY_INDEXDEC,0));
DRAWTEXT_FIX(ISLASTBAR AND HY_INDEXC>HY_INDEXO,0.5,0,0,'阳'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND HY_INDEXC<HY_INDEXO,0.5,0,0,'阴'),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR AND HY_INDEXC=HY_INDEXO,0.5,0,0,'平'),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.3,0,0,上涨),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.4,0,0,下跌),COLORYELLOW;
NOTEXT5:MA(INDEC,5);
NOTEXT10:MA(INDEC,10);
NOTEXT20:MA(INDEC,20);
NOTEXT60:MA(INDEC,60);





来函数检测结果如下:
该公式没有未来函数


解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

创业板赋值:INBLOCK('创业板')
中小企业赋值:INBLOCK('中小企业')
上证A股赋值:INBLOCK('上证A股')
深证A股赋值:INBLOCK('深证A股')
INDEH赋值:IF(中小企业=1,"399005$H",IF(创业板=1,"399006$H",IF(上证A股=1,"999999$H","399001$H"))),NODRAW
INDEO赋值:IF(中小企业=1,"399005$O",IF(创业板=1,"399006$O",IF(上证A股=1,"999999$O","399001$O"))),NODRAW
INDEL赋值:IF(中小企业=1,"399005$L",IF(创业板=1,"399006$L",IF(上证A股=1,"999999$L","399001$L"))),NODRAW
INDEC赋值:IF(中小企业=1,"399005$C",IF(创业板=1,"399006$C",IF(上证A股=1,"999999$C","399001$C"))),NODRAW
DRAWKLINE(INDEH,INDEO,INDEL,INDEC)
板块赋值:IF(中小企业=1,'中小企业指数',IF(创业板=1,'创业板指数',IF(上证A股=1,'上证指数','深证指数')))
AA赋值:1日前的INDEC
输出指数涨幅:IF(AA>0,(INDEC-AA)*100/AA,0),NODRAW
A:=STRCAT(板块,STRCAT(':',CON2STR(INDEC,2)))
当满足条件ISLASTBAR时,在横轴0纵轴0位置书写文字
上涨赋值:VARCAT('上涨:',VAR2STR(HY_INDEXADV,0))
下跌赋值:VARCAT('下跌:',VAR2STR(HY_INDEXDEC,0))
当满足条件ISLASTBAR AND HY_INDEXC>HY_INDEXO时,在横轴0.5纵轴0位置书写文字
当满足条件ISLASTBAR AND HY_INDEXC当满足条件ISLASTBAR AND HY_INDEXC=HY_INDEXO时,在横轴0.5纵轴0位置书写文字
当满足条件ISLASTBAR时,在横轴0.3纵轴0位置书写文字
当满足条件ISLASTBAR时,在横轴0.4纵轴0位置书写文字
输出NOTEXT5:INDEC的5日简单移动平均
输出NOTEXT10:INDEC的10日简单移动平均
输出NOTEXT20:INDEC的20日简单移动平均
输出NOTEXT60:INDEC的60日简单移动平均



指标安装下载帮助  |   联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:指标公式网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图