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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[同花顺] 同花顺MACD正负能量副图指标 源码


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

同花顺MACD正负能量副图指标 源码

用法同macd
使用时请参考大盘,成交量,均线和其它指标。
欢迎使用和优化。


DI:=(EMA(CLOSE,12) - EMA(CLOSE,26))*200;
DE:=EMA(DI,9);
MACD:=2*(DI-DE);
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*400-200;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,8,0),colorred;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,8,0),colorblue;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,8,0),colorgreen;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,8,0),colormagenta;
Zero : 0;
gj:=MAX(C,O);
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),colorffff00;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),color00ff00;
L4:=LLV(gj,4);
H4:=HHV(gj,4);
A9:=(HIGH+LOW)/2;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CI:(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
C2:MA(CI,4);
C3:MA(CI,10),linethick1;;
FILLRGN(CI,C2,CI>C2,RGB(0,255,0,),CI<C2,colorblack);
FILLRGN(CI,C3,CI>C3,RGB(255,0,0,),CI<C3,colorblack);
FILLRGN(CI,C2,CI>C2,RGB(0,255,0,),CI<C2,colorgreen);
FILLRGN(CI,C3,CI>C3,RGB(255,0,0,),CI<C3,colorgreen);
DIF:EMA(CLOSE,12)-EMA(CLOSE,150);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
启动点:=MACD<0 AND MACD>REF(MACD ,1) AND REF(MACD ,1)<REF(MACD ,2)
AND REF(MACD ,2)<REF(MACD ,3)
AND REF(MACD ,3)<REF(MACD ,4);
STICKLINE(启动点,0.4,MACD,8,0),coloryellow;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.8,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.6,0),COLOR0000BB;
启动点A:0,coloryellow;
DRAWICON(启动点,2,11);





 



gd46441

回复

举报

QQ|

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

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