通达信水上水下主图指标 源码无未来 附使用方法
DRAWGBK(C>O,RGB(40,40,40),RGB(00,00,00),0,0,1);
{K线}
STICKLINE(O>=C,H,L,0,0),COLORGREEN;
STICKLINE(O>=C,C,O,3,0),COLORGREEN;
STICKLINE(C>=O,L,H,0,0),COLORRED;
STICKLINE(C>=O,C,O,3,1),COLORRED;
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
XA_1:=IF(DATE<=1200823,1,0);
涨停:=C>=ZTPRICE(REF(C,1),BK) AND C=H;
曾涨停:=(H>=ZTPRICE(REF(C,1),BK) AND C<H) OR (H>=ZTPRICE(REF(CLOSE,1),0.1) AND C<H AND XA_1=1);
STICKLINE(涨停 AND PERIOD=5,C,O,1.5,0),COLORYELLOW;
STICKLINE(曾涨停 AND PERIOD=5,C,O,1.5,0),COLORYELLOW;{涨停后回落}
DRAWTEXT(曾涨停 AND PERIOD=5,H,'炸'),COLORCYAN;
水面:MA(COST(50),7),COLORCYAN,DOTLINE;
水面分界线:水面,COLORCYAN,STICK;
MA1:MA(CLOSE,5),COLORWHITE;
MA2:MA(CLOSE,10),COLORMAGENTA;
行业板块:=STRCAT(STRCAT('【细分行业】',MOREHYBLOCK),STRCAT(' 【主营构成】',MAINBUSINESS));
DRAWTEXT_FIX(1,0.000,0.01,0,行业板块),COLORWHITE;
DRAWTEXT_FIX(1,0.003,0.05,0,STRCAT(STRCAT('公司地位:',EXTERNSTR(1,10010)),' '))COLORYELLOW;
DRAWTEXT_FIX(1,0.003,0.09,0,STRCAT(STRCAT('主营业务:',EXTERNSTR(1,10020)),' '))COLORFF0080;
DRAWTEXT_FIX(1,0.003,0.13,0,STRCAT(STRCAT('概念主题:',EXTERNSTR(1,10001)),' '))COLORCYAN;
DRAWTEXT_FIX(1,0.003,0.17,0,STRCAT(STRCAT('业绩预告:',EXTERNSTR(1,10014)),' '))COLORGREEN;
DRAWTEXT_FIX(1,0.003,0.21,0,STRCAT(STRCAT('实际控制人:',EXTERNSTR(1,10007)),' '))COLORFF0FF3;
DRAWTEXT_FIX(1,0.003,0.25,0,STRCAT(STRCAT('实控人类型:',EXTERNSTR(1,10008)),' '))COLOR0079F2;
所属地域:=STRCAT('所属地域:',DYBLOCK);
DRAWTEXT_FIX(1,0.003,0.29,0,所属地域),COLORRED;
{扫雷宝变色}
安全分:=SAFESCORE;
扫雷宝:=STRCAT(STRCAT('【扫雷宝:',VAR2STR(安全分,0)),'分】');
DRAWTEXT_FIX(安全分>=80,0.450,0.00,0,扫雷宝),COLORRED;
DRAWTEXT_FIX(安全分<80 AND 安全分>60,0.450,0.00,0,扫雷宝),COLORLIRED;
DRAWTEXT_FIX(安全分<=60,0.450,0.00,0,扫雷宝),COLORGREEN;
未来函数检测结果如下:
该公式包含未来函数:COST
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
DRAWGBK(C>O,RGB(40,40,40),RGB(00,00,00),0,0,1)
当满足条件O>=C时,在H和L之间画柱状线
当满足条件O>=C时,在C和O之间画柱状线
当满足条件C>=O时,在L和H之间画柱状线
当满足条件C>=O时,在C和O之间画柱状线
BK赋值:IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)))
如果DATE<=1200823返回1否则返回0
涨停赋值:C>=ZTPRICE(1日前的C,BK) AND C=H
曾涨停赋值:(H>=ZTPRICE(1日前的C,BK) AND C=ZTPRICE(1日前的收盘价,0.1) AND C当满足条件涨停 AND PERIOD=5时,在C和O之间画柱状线
当满足条件曾涨停 AND PERIOD=5时,在C和O之间画柱状线
当满足条件曾涨停 AND PERIOD=5时,在H和'炸'位置书写文字
输出水面:MA(获利盘为50%的成本分布,7),画青色,DOTLINE
水面分界线:水面,画青色,STICK
输出MA1:收盘价的5日简单移动平均,画白色
输出MA2:收盘价的10日简单移动平均,画洋红色
行业板块赋值:STRCAT(STRCAT('【细分行业】',MOREHYBLOCK),STRCAT(' 【主营构成】',MAINBUSINESS))
当满足条件1时,在横轴0.000纵轴0.01位置书写文字
DRAWTEXT_FIX(1,0.003,0.05,0,STRCAT(STRCAT('公司地位:',EXTERNSTR(1,10010)),' '))画黄色
DRAWTEXT_FIX(1,0.003,0.09,0,STRCAT(STRCAT('主营业务:',EXTERNSTR(1,10020)),' '))COLORFF0080
DRAWTEXT_FIX(1,0.003,0.13,0,STRCAT(STRCAT('概念主题:',EXTERNSTR(1,10001)),' '))画青色
DRAWTEXT_FIX(1,0.003,0.17,0,STRCAT(STRCAT('业绩预告:',EXTERNSTR(1,10014)),' '))画绿色
DRAWTEXT_FIX(1,0.003,0.21,0,STRCAT(STRCAT('实际控制人:',EXTERNSTR(1,10007)),' '))COLORFF0FF3
DRAWTEXT_FIX(1,0.003,0.25,0,STRCAT(STRCAT('实控人类型:',EXTERNSTR(1,10008)),' '))COLOR0079F2
所属地域赋值:STRCAT('所属地域:',DYBLOCK)
当满足条件1时,在横轴0.003纵轴0.29位置书写文字
{扫雷宝变色}
安全分赋值:SAFESCORE
扫雷宝赋值:STRCAT(STRCAT('【扫雷宝:',VAR2STR(安全分,0)),'分】')
当满足条件安全分>=80时,在横轴0.450纵轴0.00位置书写文字
当满足条件安全分<80 AND 安全分>60时,在横轴0.450纵轴0.00位置书写文字
当满足条件安全分<=60时,在横轴0.450纵轴0.00位置书写文字