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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信高手晋级 大周期百分比主图公式


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

以下是通达信高手晋级 大周期百分比主图公式

通达信高手晋级 大周期百分比主图公式

由于我设定的是在大周期里才能看到,日线以下周期里是看不到的,所以请在季线,月线,年线里看看

源码

MA5:MA(C,5),COLORBLUE;
MA10:MA(C,10),COLORGREEN;
MA20:MA(C,20),COLORCYAN;
MA30:=MA(C,30),COLORRED;
MA40:=MA(C,40),COLORMAGENTA;
MA60:MA(C,60),COLORLIGRAY;
HHVBAR:=HHV(H,BARSCOUNT(H));
HHVBAR2:=HHV(H,3);

LL0:=IF(PERIOD=14 OR PERIOD=11 OR PERIOD=10 OR PERIOD=18 OR PERIOD=17 OR PERIOD=16 OR PERIOD=15 OR PERIOD=7,1,0);
LL1:=IF(ISLASTBAR AND LL0=1,1,0);
DRAWNUMBER_FIX(LL1=1,0.85,1-C/HHVBAR,1,C),COLORRED;

DRAWNUMBER_FIX(LL1=1,0.79,0.00,1,HHVBAR),COLORRED;
DRAWTEXT_FIX(LL1=1,0.75,0.00,1,'上市以来最高点');

DRAWNUMBER_FIX(LL1=1,0.79,0.10,1,HHVBAR-HHVBAR*0.1),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.79,0.20,1,HHVBAR-HHVBAR*0.2),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.79,0.30,1,HHVBAR-HHVBAR*0.3),COLORCYAN;
DRAWTEXT_FIX(LL1=1,0.75,0.30,1,'(30%)');
DRAWNUMBER_FIX(LL1=1,0.79,0.40,1,HHVBAR-HHVBAR*0.4),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.79,0.50,1,HHVBAR-HHVBAR*0.5),COLORRED;
DRAWTEXT_FIX(LL1=1,0.75,0.50,1,'(50%)');
DRAWNUMBER_FIX(LL1=1,0.79,0.60,1,HHVBAR-HHVBAR*0.6),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.79,0.70,1,HHVBAR-HHVBAR*0.7),COLORGREEN;
DRAWTEXT_FIX(LL1=1,0.75,0.70,1,'(70%)');
DRAWNUMBER_FIX(LL1=1,0.79,0.80,1,HHVBAR-HHVBAR*0.8),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.79,0.90,1,HHVBAR-HHVBAR*0.9),COLORBLUE;
DRAWNUMBER_FIX(LL1=1,0.79,0.99,1,HHVBAR-HHVBAR*0.99),COLORRED;

DRAWNUMBER_FIX(LL1=1,0.95,1-C/HHVBAR2,1,C),COLORRED;
DRAWNUMBER_FIX(LL1=1,0.90,0.00,1,HHVBAR2),COLORRED;
DRAWTEXT_FIX(LL1=1,0.86,0.00,1,'近三周期高点');
DRAWNUMBER_FIX(LL1=1,0.90,0.10,1,HHVBAR2-HHVBAR2*0.1),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.90,0.20,1,HHVBAR2-HHVBAR2*0.2),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.90,0.30,1,HHVBAR2-HHVBAR2*0.3),COLORCYAN;
DRAWNUMBER_FIX(LL1=1,0.90,0.40,1,HHVBAR2-HHVBAR2*0.4),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.90,0.50,1,HHVBAR2-HHVBAR2*0.5),COLORRED;

DRAWNUMBER_FIX(LL1=1,0.90,0.60,1,HHVBAR2-HHVBAR2*0.6),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.90,0.70,1,HHVBAR2-HHVBAR2*0.7),COLORGREEN;
DRAWNUMBER_FIX(LL1=1,0.90,0.80,1,HHVBAR2-HHVBAR2*0.8),COLORLIGRAY;
DRAWNUMBER_FIX(LL1=1,0.90,0.90,1,HHVBAR2-HHVBAR2*0.9),COLORBLUE;
DRAWNUMBER_FIX(LL1=1,0.90,0.99,1,HHVBAR2-HHVBAR2*0.99),COLORRED;

DRAWNUMBER_FIX(LL1=1,0.99,1-O/HHVBAR2,1,O),COLORRED;
DRAWNUMBER_FIX(LL1=1,0.99,1-H/HHVBAR2,1,1-O/H),COLORRED;
DRAWNUMBER_FIX(LL1=1,0.99,1-L/HHVBAR2,1,1-L/O),COLORRED;

LL2:=IF(ISLASTBAR AND PERIOD=5,1,0);
QC:IF(LL2=1, REF(CLOSE,1),DRAWNULL),COLORRED,LINETHICK4;

ZHANG5%:IF( LL2=1,QC+QC*0.05,DRAWNULL),COLORBLUE,LINETHICK2;

ZHANG10%:IF( LL2=1,QC+QC*0.1,DRAWNULL),COLORBLUE,LINETHICK4;

DIE5%:IF( LL2=1,QC-QC*0.05,DRAWNULL),COLORBLUE,LINETHICK2;

DIE10%:IF( LL2=1,QC-QC*0.1,DRAWNULL),COLORBLUE,LINETHICK4;








回复

举报

QQ|

GMT+8, 2024-11-19 13:28

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