通达信筹码突破副图指标 黄线上穿红线开始走强 源码
{A筹码突破 副图}
筹码密集度:(COST(90+(100-90)/2)-COST((100-90)/2))/(COST(90+(100-90)/2)+COST((100-90)/2))+CLOSE
,COLORYELLOW,LINETHICK1;
筹码线:EMA(COST(99),181),POINTDOT,COLORMAGENTA,LINETHICK2;
筹码集中点:LONGCROSS(筹码密集度,筹码线,60),NODRAW;
DRAWICON(筹码集中点,筹码线,42);
箱顶:MA(REF(HHV(C,30),1),2),COLOR0000FF,LINETHICK2;
箱底:MA(REF(LLV(C,30),1),2),COLOR00FF00,LINETHICK2;
{股价N日内从最高价到最低价,或最高价至目前股价的跌幅计算公式}
N:=20{N自定};
高低跌幅%:IF(HHVBARS(H,N)>0,LLV(L,HHVBARS(H,N)+1)/HHV(H,N)*100-100,0),NODRAW;
高至今跌幅%:IF(HHVBARS(H,N)>0,C/HHV(H,N)*100-100,0),NODRAW;
{股价N日内从最低价到最高价,或最低价至目前股价的涨幅计算公式}
低高涨幅%:IF(LLVBARS(L,N)>0,HHV(H,LLVBARS(L,N)+1)/LLV(L,N)*100-100,0),NODRAW;
低至今涨幅%:IF(LLVBARS(L,N)>0,C/LLV(L,N)*100-100,0),NODRAW;
{营收四率}
BGQ:=FINVALUE(0);
Z111:=STRCAT('公告日期:20',CON2STR(BGQ,0));
DRAWTEXT_FIX(1,0.12,0.01,0,Z111),COLORWHITE;
净资收益率:(FINANCE(33)/FINANCE(34)*100),COLORWHITE,NODRAW;
主营利润率:(FINANCE(23)/FINANCE(20)*100),COLORYELLOW,NODRAW;
主营业增长率:FINANCE(44),COLORMAGENTA,NODRAW;{44 营业收入同比%}
净利润增长率:FINANCE(43),COLORRED,NODRAW;{43 净利润同比%}
利润扣非同比%:FINONE(191,0,0),NODRAW,,COLORYELLOW;{扣非增长率};
DRAWTEXT_FIX(1,0.01,0,0,STRCAT(STRCAT('净资收益 ',CON2STR(净资收益率,0)),'%')),COLORWHITE;
DRAWRECTREL(10,85,110,155,RGB(120,120,120));
DRAWRECTREL(10,100,(10+CONST(ABS(净资收益率)*100/100)),140,IF(CONST(净资收益率)>0,RGB(250,0,0),RGB(0,200,0)));
DRAWTEXT_FIX(1,0.01,0.18,0,STRCAT(STRCAT('主营利润 ',CON2STR(主营利润率,0)),'%')),COLORYELLOW;
DRAWRECTREL(10,280,(10+CONST(ABS(主营利润率)*100/100)),320,IF(CONST(主营利润率)>0,RGB(250,0,0),RGB(0,200,0)));
DRAWTEXT_FIX(1,0.01,0.36,0,STRCAT(STRCAT('主营业增长 ',CON2STR(主营业增长率,0)),'%')),COLORMAGENTA;
DRAWRECTREL(10,460,(10+CONST(ABS(主营业增长率)*100/100)),500,IF(CONST(主营业增长率)>0,RGB(200,0,200),RGB(0,200,0)));
Q1W1:=STRCAT(STRCAT('净利润增长 ',CON2STR(净利润增长率,0)),'%● ');
Q2W2:=STRCAT(STRCAT('扣非同比 ',CON2STR(利润扣非同比%,0)),'% ');
Q3W3:=STRCAT(Q1W1,Q2W2);
DRAWTEXT_FIX(1,0.01,0.54,0,Q3W3),COLORRED;
DRAWRECTREL(10,645,(10+CONST(ABS(净利润增长率)*100/100)),695,IF(CONST(净利润增长率)>0,RGB(180,0,0),RGB(0,200,0)));
DRAWRECTREL(10,658,(10+CONST(ABS(利润扣非同比%)*100/100)),682,IF(CONST(利润扣非同比%)>0,RGB(250,0,0),RGB(0,200,200)));
{显示业绩预告柱}
预告日期:=FINVALUE(313),COLOR0080FF,NODRAW;
KSK:=STRCAT(STRCAT('预告日期 ',CON2STR(预告日期,0)),' ●');
DRAWTEXT_FIX(FINONE(285,0,0)<>0,0.01,0.74,0,KSK),COLORYELLOW;
下限:=FINONE(285,0,0),COLOR0080FF,NODRAW;
上限:=FINONE(286,0,0),COLOR0080FF,NODRAW;
YG101:=(FINONE(285,0,0)>0 OR FINONE(285,0,0)<0);
预101:=IF(YG101,'业绩预告增幅 ',DRAWNULL);
A101:=STRCAT(预101,STRCAT(CON2STR(FINONE(285,0,0),0),' %'));
B101:=STRCAT('~',STRCAT(CON2STR(FINONE(286,0,0),0),' % '));
C101:=STRCAT(A101,B101);
DRAWTEXT_FIX(FINONE(285,0,0)>0,0.085,0.74,0,C101),COLORYELLOW;
DRAWTEXT_FIX(FINONE(285,0,0)<0,0.085,0.74,0,C101),COLOR00FF00;
DRAWRECTREL(10,854,(10+CONST(ABS(上限)*100/100)),915,IF(CONST(上限)>0,RGB(250,0,0),RGB(0,200,0)));
DRAWRECTREL(10,864,(10+CONST(ABS(下限)*100/100)),906,IF(CONST(下限)>0,RGB(180,0,0),RGB(0,200,200)));
未来函数检测结果如下:
该公式包含未来函数:COST
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出{A筹码突破 副图}筹码密集度:(获利盘为90+(100-90%的成本分布/2)-COST((100-90)/2))/(获利盘为90+(100-90%的成本分布/2)+COST((100-90)/2))+收盘价,画黄色,LINETHICK1
输出筹码线:EMA(获利盘为99%的成本分布,181),POINTDOT,画洋红色, 线宽为2
输出筹码集中点:LONGCROSS(筹码密集度,筹码线,60),NODRAW
当满足条件筹码集中点时,在筹码线和42之间画图标
输出箱顶:MA(REF(30日内C最高值,1),2),COLOR0000FF, 线宽为2
输出箱底:MA(REF(30日内C最低值,1),2),COLOR00FF00, 线宽为2
{股价N日内从最高价到最低价,或最高价至目前股价的跌幅计算公式}N赋值:20{N自定}
输出高低跌幅%:IF(HHVBARS(H,N)>0,LLV(L,HHVBARS(H,N)+1)/N日内H最高值*100-100,0),NODRAW
输出高至今跌幅%:IF(HHVBARS(H,N)>0,C/N日内H最高值*100-100,0),NODRAW
输出{股价N日内从最低价到最高价,或最低价至目前股价的涨幅计算公式}低高涨幅%:IF(LLVBARS(L,N)>0,HHV(H,LLVBARS(L,N)+1)/N日内L最低值*100-100,0),NODRAW
输出低至今涨幅%:IF(LLVBARS(L,N)>0,C/N日内L最低值*100-100,0),NODRAW
{营收四率}BGQ赋值:FINVALUE(0)
Z111:=STRCAT('公告日期:20',CON2STR(BGQ,0))
当满足条件1时,在横轴0.12纵轴0.01位置书写文字
输出净资收益率:(FINANCE(33)/FINANCE(34)*100),画白色,NODRAW
输出主营利润率:(FINANCE(23)/FINANCE(20)*100),画黄色,NODRAW
输出主营业增长率:FINANCE(44),画洋红色,NODRAW
输出{44 营业收入同比%}净利润增长率:FINANCE(43),画红色,NODRAW
输出{43 净利润同比%}利润扣非同比%:FINONE(191,0,0),NODRAW,,画黄色
{扣非增长率}
DRAWTEXT_FIX(1,0.01,0,0,STRCAT(STRCAT('净资收益 ',CON2STR(净资收益率,0)),'%')),画白色
DRAWRECTREL(10,85,110,155,RGB(120,120,120))
DRAWRECTREL(10,100,(10+CONST(净资收益率的绝对值*100/100)),140,IF(CONST(净资收益率)>0,RGB(250,0,0),RGB(0,200,0)))
DRAWTEXT_FIX(1,0.01,0.18,0,STRCAT(STRCAT('主营利润 ',CON2STR(主营利润率,0)),'%')),画黄色
DRAWRECTREL(10,280,(10+CONST(主营利润率的绝对值*100/100)),320,IF(CONST(主营利润率)>0,RGB(250,0,0),RGB(0,200,0)))
DRAWTEXT_FIX(1,0.01,0.36,0,STRCAT(STRCAT('主营业增长 ',CON2STR(主营业增长率,0)),'%')),画洋红色
DRAWRECTREL(10,460,(10+CONST(主营业增长率的绝对值*100/100)),500,IF(CONST(主营业增长率)>0,RGB(200,0,200),RGB(0,200,0)))
Q1W1赋值:STRCAT(STRCAT('净利润增长 ',CON2STR(净利润增长率,0)),'%● ')
Q2W2赋值:STRCAT(STRCAT('扣非同比 ',CON2STR(利润扣非同比%,0)),'% ')
Q3W3赋值:STRCAT(Q1W1,Q2W2)
当满足条件1时,在横轴0.01纵轴0.54位置书写文字
DRAWRECTREL(10,645,(10+CONST(净利润增长率的绝对值*100/100)),695,IF(CONST(净利润增长率)>0,RGB(180,0,0),RGB(0,200,0)))
DRAWRECTREL(10,658,(10+CONST(利润扣非同比%的绝对值*100/100)),682,IF(CONST(利润扣非同比%)>0,RGB(250,0,0),RGB(0,200,200)))
{显示业绩预告柱} 预告日期赋值:FINVALUE(313),COLOR0080FF,NODRAW
KSK赋值:STRCAT(STRCAT('预告日期 ',CON2STR(预告日期,0)),' ●')
DRAWTEXT_FIX(FINONE(285,0,0)<>0,0.01,0.74,0,KSK),画黄色
下限赋值:FINONE(285,0,0),COLOR0080FF,NODRAW
上限赋值:FINONE(286,0,0),COLOR0080FF,NODRAW
YG101赋值:(FINONE(285,0,0)>0 OR FINONE(285,0,0)<0)
如果YG101返回'业绩预告增幅 '否则返回DRAWNULL
A101赋值:STRCAT(预101,STRCAT(CON2STR(FINONE(285,0,0),0),' %'))
B101赋值:STRCAT('~',STRCAT(CON2STR(FINONE(286,0,0),0),' % '))
C101赋值:STRCAT(A101,B101)
DRAWTEXT_FIX(FINONE(285,0,0)>0,0.085,0.74,0,C101),画黄色
DRAWTEXT_FIX(FINONE(285,0,0)<0,0.085,0.74,0,C101),COLOR00FF00
DRAWRECTREL(10,854,(10+CONST(上限的绝对值*100/100)),915,IF(CONST(上限)>0,RGB(250,0,0),RGB(0,200,0)))
DRAWRECTREL(10,864,(10+CONST(下限的绝对值*100/100)),906,IF(CONST(下限)>0,RGB(180,0,0),RGB(0,200,200)))