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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信公式命运罗盘主图指标公式源码

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

显示仪表盘1:=0,1,1;DRAWGBK(1,RGB(0,0,0),RGB(0,0,0),0,'BJ1',0);{======================================================}
范围高A:=REFDATE(HHV(H,120),DATE)*1.05;
范围低A:=REFDATE(LLV(L,120),DATE)*0.95;
MA5:=MA(C,5),COLORCYAN,LINETHICK2;
MA24:=MA(C,24),COLORGREEN,LINETHICK2;
MA72:=MA(C,72),COLORRED,LINETHICK2;
MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) OR C>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2;
{=======================仪表盘=========================}
主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);
主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);
主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 AND MA5>IF(MA200=DRAWNULL,0,MA200);
初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;
底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA5>MA24;
探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA24>MA5;
观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);
有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C>=MA72,MA72<MA200 AND C>=MA200);
放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);
DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0)COLOR00BF00;
DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0)COLORFF00FF;
DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0)COLORFF8080;
DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0)COLOR009500;
DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0)COLOR00FFFF;
DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0)COLORFFFF00;
DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);
DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0)COLORFFFF00;
DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0)COLOR00FFFF;
DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0)COLOR00BF00;
引差:=REF(C,1)-LOW,LINETHICK1,NODRAW;
引跌幅:IF((REF(C,1)-LOW)/REF(C,1)*100>0,(REF(C,1)-LOW)/REF(C,1)*100,0),LINETHICK1,NODRAW;
三日均跌:MA(引跌幅,3),COLORWHITE,NODRAW;N:=120;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0)),NODRAW;{高点}
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0)),NODRAW;{低点}
KJ:=GD-DD;{高低点差值=分区高度}
GD4:=IF(CURRBARSCOUNT<=N/2,GD,DRAWNULL);
高区:IF(CURRBARSCOUNT<=N,GD,DRAWNULL),COLORRED,LINETHICK2,NODRAW;
低区:IF(CURRBARSCOUNT<=N,DD,DRAWNULL),COLOR00FF00,LINETHICK2,NODRAW;
平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),COLOR00FFFF,NODRAW;
低:IF(CURRBARSCOUNT<=N/2,DD,DRAWNULL),COLORFFFF00;
高:IF(CURRBARSCOUNT<=N/2,GD,DRAWNULL),COLOR00FFFF;
支撑:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.191,DRAWNULL),COLOR00FFFF;
强势: IF(CURRBARSCOUNT<=N/2,DD+KJ*0.382,DRAWNULL),COLORFF00FF;
突破:IF(CURRBARSCOUNT<=N/2,DD+KJ/2,DRAWNULL),COLOR0000FF;
警示:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.618,DRAWNULL),COLOR00FFFF;
压力:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.809,DRAWNULL),COLOR00FF00;
低涨:IF(CURRBARSCOUNT<=N/2,(C/LLV(LOW,K)-1)*100,DRAWNULL),COLOR0000FF,NODRAW;
天数:BARSLAST(L=DD),COLORCYAN,NODRAW;
顶点:IF(CURRBARSCOUNT<=N/2, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED,CROSSDOT,NODRAW;
低点:IF(CURRBARSCOUNT<=N/2, CONST(IF(ISLASTBAR=1,LLV(L,




回复

举报

QQ|

GMT+8, 2024-11-6 03:05

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