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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[同花顺] 同花顺KD与MACD副图指标 源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-29 12:26:53
同花顺KD与MACD副图指标 源码介绍

同花顺KD与MACD副图指标 源码

DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA/2);
AH:=HHV(MACD,13*1);
AL:=LLV(MACD,13*0.3);
STICKLINE(MACD>0 ,MACD,0,1,0),COLOR0000AA,LINETHICK1;
STICKLINE(MACD<0 ,MACD,0,1,0),COLOR008800,LINETHICK1;
趋势线:=EMA(MACD,34,1);
PARTLINE(趋势线,趋势线>REF(趋势线,1),RGB(255,255,0),趋势线<REF(趋势线,1),RGB(0,80,255)),LINETHICK1;
FILLRGN(趋势线,REF(趋势线,1),趋势线>REF(趋势线,1),RGB(255,255,0),趋势线<=REF(趋势线,1),RGB(0,88,255));
K:=SMA(MACD,2,1);
D:=SMA(K,2,1);
J:SMA(D,2,1);
STICKLINE(MACD>0,0.000001,0.000003,15,0),colorred;
STICKLINE(MACD<0,0.000001,0.000003,15,0),colorgreen;
PARTLINE(K,K>REF(K,1),RGB(255,0,0),K<REF(K,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(D,D>REF(D,1),RGB(255,0,0),D<REF(D,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(J,J>REF(J,1),RGB(255,0,0),J<REF(J,1),RGB(0,255,0)),LINETHICK2;
STICKLINE(REF(MACD,1)<MACD,MACD,REF(MACD,1),7,0),coloryellow;
STICKLINE(MACD=AH,AH,K,8,0),LINETHICK1,colorred;
STICKLINE(REF(MACD,2)>MACD,MACD,REF(MACD,1),8,1),colorgreen;






gd46494

回复

举报

QQ|

GMT+8, 2024-11-18 03:26

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