股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信水上水下主图指标公式源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-6-3 14:10:38

{指标介绍:K线在水下不参与,第一次上穿水平面开始关注,K线回踩水平面或第二次上穿水平面,且5日线大于10日线,开始出手买入,股价处于高位,5日线与10日线死叉止盈。}

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;





回复

举报

QQ|

GMT+8, 2024-11-16 16:40

快速回复 返回顶部 返回列表