当前位置:→ 股海网通达信公式 → 正文
  • 通达信常用的DIY主图指标源码 各取所需 希望对你有用

  • 相关简介:通达信常用的DIY主图指标源码 各取所需 希望对你有用

  • 文章来源:股海网作者:股海网发布时间:2022-09-15浏览次数:下载次数:0

通达信常用的DIY主图指标源码 各取所需 希望对你有用

{均线}
MA5:MA(C,5),COLORWHITE;
MA10:MA(C,10),COLORYELLOW;
MA30:MA(C,30),COLORMAGENTA;
MA60:MA(C,60),COLORRED;
MA120:MA(C,120),COLORBLUE;
MA250:MA(C,250),COLORGREEN;

{变色BBI}
BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
IF(C>=BBI,BBI,DRAWNULL),COLORRED;
IF(C<BBI,BBI,DRAWNULL),COLORGREEN;

{神奇九转}
B:=C<REF(C,4);
N:=CURRBARSCOUNT;
B1:=(N=6 AND REFXV(COUNT(B,6),5)=6) OR (N=7 AND REFXV(COUNT(B,7),6)=7) OR (N=8 AND REFXV(COUNT(B,8),7)=8) OR (N>=9 AND REFXV(COUNT(B,9),8)=9);
DRAWNUMBER(B1 AND REF(B,1)=0,L,1),COLORMAGENTA;
B2:=(N=5 AND REFXV(COUNT(B,6),4)=6) OR (N=6 AND REFXV(COUNT(B,7),5)=7) OR (N=7 AND REFXV(COUNT(B,8),6)=8) OR (N>=8 AND REFXV(COUNT(B,9),7)=9);
DRAWNUMBER(B2 AND REF(B,2)=0,L,2),COLORMAGENTA;
B8:=(N=1 AND COUNT(B,8)=8) OR (N>=2 AND REFXV(COUNT(B,9),1)=9);
DRAWNUMBER(B8 AND REF(B,8)=0,L,8),COLORMAGENTA;
B9:=(N>=1 AND COUNT(B,9)=9);
DRAWNUMBER(B9 AND REF(B,9)=0,L,9),COLORBROWN;
S:=C>REF(C,4);
S1:=(N=6 AND REFXV(COUNT(S,6),5)=6) OR (N=7 AND REFXV(COUNT(S,7),6)=7) OR (N=8 AND REFXV(COUNT(S,8),7)=8) OR (N>=9 AND REFXV(COUNT(S,9),8)=9);
DRAWNUMBER(S1 AND REF(S,1)=0,H,1),COLORMAGENTA,DRAWABOVE;
S2:=(N=5 AND REFXV(COUNT(S,6),4)=6) OR (N=6 AND REFXV(COUNT(S,7),5)=7) OR (N=7 AND REFXV(COUNT(S,8),6)=8) OR (N>=8 AND REFXV(COUNT(S,9),7)=9);
DRAWNUMBER(S2 AND REF(S,2)=0,H,2),COLORMAGENTA,DRAWABOVE;
S8:=(N=1 AND COUNT(S,8)=8) OR (N>=2 AND REFXV(COUNT(S,9),1)=9);
DRAWNUMBER(S8 AND REF(S,8)=0,H,8),COLORMAGENTA,DRAWABOVE;
S9:=(N>=1 AND COUNT(S,9)=9);
DRAWNUMBER(S9 AND REF(S,9)=0,H,9),COLORGREEN,DRAWABOVE;

{虚拟涨跌停}
KXZT:=IF(CURRBARSCOUNT=1 AND PERIOD=5 AND NOT(C>1500 OR DYNAINFO(7)=0) AND C>=O,REF(CLOSE,1)*1.1,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,KXZT,MAX(OPEN,CLOSE),-1,-1),COLOR00C0C0;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
KXDT:=IF(CURRBARSCOUNT=1  AND PERIOD=5 AND NOT(C>1500) AND C<O,REF(CLOSE,1)*0.9,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1  AND PERIOD=5,KXDT,MIN(OPEN,CLOSE),-1,-1),COLORLIBLUE;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(CURRBARSCOUNT=1&&(CODELIKE('68')>0||CODELIKE('30')>0)&&PERIOD=5&&C>O,ZTPRICE(REF(C,1),0.2),MAX(OPEN,CLOSE),-1,-1),COLORMAGENTA;
STICKLINE(CURRBARSCOUNT=1&&(CODELIKE('68')>0||CODELIKE('30')>0)&&PERIOD=5&&C<O,DTPRICE(REF(C,1),0.2),MIN(OPEN,CLOSE),-1,-1),COLORGRAY;

{涨跌停K线变色}
RQ:=IF(DATE>=1200824,1,0);
KCB:=IF(INBLOCK('科创板'),1,0);
CYB:=IF(INBLOCK('创业板') AND RQ,1,0);
{20%涨停洋红色,跌停蓝色}
STICKLINE(C/REF(C,1)>1.195 AND C=H AND (KCB OR CYB) AND PERIOD=5,O,C,3,0),COLORMAGENTA;
STICKLINE(C/REF(C,1)<0.805 AND C=L AND (KCB OR CYB) AND PERIOD=5,O,C,3,0),COLORBLUE;
{10%涨停红色,跌停绿色}
STICKLINE(C/REF(C,1)>1.095 AND C=H AND NOT(KCB OR CYB) AND PERIOD=5,O,C,3,0),COLORRED;
STICKLINE(C/REF(C,1)<0.905 AND C=L AND NOT(KCB OR CYB) AND PERIOD=5,O,C,3,0),COLORGREEN;

{涨跌停价格}
TM:=1200823;
涨停:IF(DATE<TM,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:IF(DATE<TM,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
明涨停:IF(DATE<TM,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
明跌停:IF(DATE<TM,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;

{近日最高最低价画线}
近日高:IF(CURRBARSCOUNT<=CONST(FINDHIGHBARS(HIGH,0,6,1)+1),CONST(FINDHIGH(HIGH,0,6,1)),DRAWNULL),COLORRED,LINETHICK1;
近日低:IF(CURRBARSCOUNT<=CONST(FINDLOWBARS(LOW,0,6,1)+1),CONST(FINDLOW(LOW,0,6,1)),DRAWNULL),COLORGREEN,LINETHICK1;
DRAWSL(ISLASTBAR,近日高,0,2000,1),COLORRED,LINETHICK1;
DRAWSL(ISLASTBAR,近日低,0,2000,1),COLORGREEN,LINETHICK1;

{大于5%分时均价}
分时均价:AMOUNT/VOL/100,NODRAW,COLORYELLOW;
大阳:=C>=REF(C,1)*1.05 AND C>O;
大阴:=C<=REF(C,1)*0.95 AND C<O;
STICKLINE(分时均价 AND 大阳,分时均价,分时均价,2.9,0),COLORWHITE;
STICKLINE(分时均价 AND 大阴,分时均价,分时均价,2.9,0),COLORRED;

{安全分}
DRAWTEXT_FIX(1,0.35,1,1,STRCAT(STRCAT('安全分:',CON2STR(SAFESCORE,0)),'分'))COLORFF00FF;

{指定日期标记}
DRAWICON(DATE=1220901,LOW,41);

{月份标记}
JZX:=MONTH<>REF(MONTH,1);{时间取值取月}
DRAWNUMBER(JZX,L,MONTH)COLORMAGENTA;

{周标记}
JZX:=WEEKDAY<>REF(WEEKDAY,1);{时间取值取周}
DRAWNUMBER(JZX,L,WEEKDAY)COLORYELLOW;

 ☟问题反馈 ☞┄┄┄┄┄┄┄┄┄┄→收藏资源:

通达信常用的DIY主图指标源码 各取所需 希望对你有用

  • 下载资源所需积分

    0

  • 当前拥有积分

    0

上传会员: 
股海网
文件大小: 
Bytes
上传时间: 
2022-09-15
下载积分: 
-
免责声明: 
请仔细阅读并同意后才能下载
本附件为用户分享上传,股海网没有对文件进行验证,不能保证下载资源的准确性、安全性和完整性,也不保证下载资源能正常安装和使用,且下载后扣除的积分无法退还,除非您充分理解并完全接受本声明,否则您无权下载。
本站对提供下载的软件、指标、资料等不拥有任何权利,其版权归该下载资源的合法拥有者所有。本附件仅供学习和研究使用,不得用于商业或者非法用途,如有侵犯您的版权, 请参看 《股海网侵权处理流程》《股海网免责声明条款》
点击下载无反应时,更换主流浏览器重新登录操作,如360浏览器、Edge浏览器、谷歌浏览器,个别浏览器有不兼容现象。
勾选以下表示您已经阅读并同意以上声明才能下载本文件,扣除积分无法退还!
我已阅读所有条款规定, 请点我同意 所有条款内容!我自愿下载!
提示:如下载失败,请点关闭刷新此页面或提交问题反馈给管理员→
关闭

关于我们 - 联系我们 - 隐私政策 - 免责声明 - 下载帮助 - 广告合作 - SiteMap - TOP
增值电信业务经营ICP许可证:湘B2-20210269 湘ICP备09016573号-10 湘公网安备43108102000040号
Copyright © 2021 铭网科技,All Rights Reserved.