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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信趋向副图指标


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

以下是通达信趋向副图指标

通达信趋向副图指标

源码

N:=14;M:=6;
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:=DMP*100/TR;
MDI:=DMM*100/TR;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:EXPMEMA(ADX,M);
DRAWBAND(ADX,RGB(255,255,0),ADXR,RGB(0,255,0));
主升:PDI,COLOR0000FF,LINETHICK2;
主跌:MDI,COLORFFFFFF,LINETHICK2;
天:80,COLOR00FF00,POINTDOT,LINETHICK4;
地:20,COLORFF00FF,POINTDOT,LINETHICK4;
TJ:=主升>20 AND ADX>ADXR;
TJ1:=主升>20 AND ADX
TJ2:=主升<=20 AND ADX>ADXR;
TJ3:=主升<=20 AND ADX
STICKLINE(TJ,主升,20,0.1,0),COLORRED;
STICKLINE(TJ1,主升,20,0.1,0),COLORDDDD00;
STICKLINE(TJ2,主升,20,0.1,0),COLORDD00DD;
STICKLINE(TJ3,主升,20,0.1,0),COLOR00DD00;
STICKLINE(CROSS(ADX,主跌) AND 主跌<20 AND ADX>ADXR,20,40,4,0),COLOR000099;
STICKLINE(CROSS(ADX,主跌) AND 主跌<20 AND ADX>ADXR,20,40,2,0),COLOR0000BB;
STICKLINE(CROSS(ADX,主跌) AND 主跌<20 AND ADX>ADXR,20,40,1,0),COLOR0000DD;
STICKLINE(CROSS(ADX,主跌) AND 主跌<20 AND ADX>ADXR,20,40,0.5,0),COLOR0000FF;
DRAWICON(CROSS(ADX,ADXR) AND 主跌<20,20,23);





回复

举报

QQ|

GMT+8, 2024-11-18 22:41

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