股性叠加显示股性等各项指标非常实用通达信公式 主图 源码附图
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORYELLOW;
{股票指标网}
P:=1000;
涨停价:=ZTPRICE(REF(CLOSE,1),0.1);
跌停价:=DTPRICE(REF(CLOSE,1),0.1);
开板:=((HIGH>=涨停价) AND (CLOSE<涨停价));
涨停数:=COUNT((C>=涨停价) AND L!=C,P) NODRAW;
开板数:=COUNT(开板,P) NODRAW;
跌停数:=COUNT(C<=跌停价,P) NODRAW;
封板率:=ROUND((1-(开板数/(涨停数+开板数)))*100);
涨停:=C>=涨停价 AND L!=C;
多连板:=HHV(BARSLAST(NOT(涨停)),P);
股性分数:=ROUND(多连板*3+涨停数*2+开板数-跌停数+封板率);
DRAWTEXT_FIX(CLOSE>0,0.100,0.07,0,STRCAT('多连板:',CON2STR(多连板,0)))COLORRED;
DRAWTEXT_FIX(CLOSE>0,0.100,0.14,0,STRCAT('涨停数:',CON2STR(涨停数,0)))COLORRED;
DRAWTEXT_FIX(CLOSE>0,0.100,0.21,0,STRCAT('开板数:',CON2STR(开板数,0)))COLORRED;
DRAWTEXT_FIX(CLOSE>0,0.100,0.28,0,STRCAT('跌停数:',CON2STR(跌停数,0)))COLORRED;
DRAWTEXT_FIX(CLOSE>0,0.100,0.35,0,STRCAT(STRCAT('封板率:',CON2STR(封板率,0)),'%'))COLORRED;
DRAWTEXT_FIX(CLOSE>0,0.100,0.42,0,STRCAT('股性分:',CON2STR(股性分数,0)))COLORRED;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
Z1赋值:STRCAT(HYBLOCK,' ')
Z2赋值:STRCAT(Z1,DYBLOCK)
Z3赋值:STRCAT(Z2,' ')
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),画黄色
{股票指标网}
P赋值:1000
涨停价赋值:ZTPRICE(1日前的收盘价,0.1)
跌停价赋值:DTPRICE(1日前的收盘价,0.1)
开板赋值:((最高价>=涨停价) AND (收盘价<涨停价))
涨停数赋值:COUNT((C>=涨停价) AND L!=C,P) NODRAW
开板数:=统计P日满足开板的天数 NODRAW
跌停数赋值:统计P日满足C<=跌停价的天数 NODRAW
封板率赋值:ROUND((1-(开板数/(涨停数+开板数)))*100)
涨停赋值:C>=涨停价 AND L!=C
多连板赋值:HHV(上次NOT(涨停距今天数),P)
股性分数赋值:ROUND(多连板*3+涨停数*2+开板数-跌停数+封板率)
DRAWTEXT_FIX(收盘价>0,0.100,0.07,0,STRCAT('多连板:',CON2STR(多连板,0)))画红色
DRAWTEXT_FIX(收盘价>0,0.100,0.14,0,STRCAT('涨停数:',CON2STR(涨停数,0)))画红色
DRAWTEXT_FIX(收盘价>0,0.100,0.21,0,STRCAT('开板数:',CON2STR(开板数,0)))画红色
DRAWTEXT_FIX(收盘价>0,0.100,0.28,0,STRCAT('跌停数:',CON2STR(跌停数,0)))画红色
DRAWTEXT_FIX(收盘价>0,0.100,0.35,0,STRCAT(STRCAT('封板率:',CON2STR(封板率,0)),'%'))画红色
DRAWTEXT_FIX(收盘价>0,0.100,0.42,0,STRCAT('股性分:',CON2STR(股性分数,0)))画红色