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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信周k线叠加周MACD源码


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

以下是通达信周k线叠加周MACD源码

{}
DRAWGBK(O>=0,RGB(0,1,0),RGB(30,31,30),0,'0',0);
{}
MON:=WEEKOFYEAR!=REF(WEEKOFYEAR,1);
MC2:=IF(MON,C#WEEK,DRAWNULL);
ML2:=IF(MON,L#WEEK,DRAWNULL);
MO2:=IF(MON,O#WEEK,DRAWNULL);
MH2:=IF(MON,H#WEEK,DRAWNULL);
周开:ALIGNRIGHT(MO2),NODRAW,COLORGRAY;
周收:ALIGNRIGHT(MC2),NODRAW,COLORGRAY;
周高:ALIGNRIGHT(MH2),NODRAW,COLORGRAY;
周低:ALIGNRIGHT(ML2),NODRAW,COLORGRAY;
{}
DIFZ:=EMA(周收,12)-EMA(周收,26);
DEAZ:=EMA(DIFZ,9);
MACDZ:=4*(DIFZ-DEAZ);
{}
中轴:REFDATE(HHV(周高,52),DATE),COLORGRAY;
{}
DRAWBAND(DIFZ*2+中轴,RGB(255,128,0),EMA(DIFZ*2+中轴,9),RGB(0,128,192));
{}
STICKLINE((中轴+MACDZ)>中轴 AND (中轴+MACDZ)>REF(中轴+MACDZ,1),中轴,中轴+MACDZ,0.8,0),COLOR000096;
STICKLINE((中轴+MACDZ)>中轴 AND (中轴+MACDZ)<=REF(中轴+MACDZ,1),中轴,中轴+MACDZ,0.8,0),COLOR009600;
STICKLINE((中轴+MACDZ)<=中轴 AND (中轴+MACDZ)<=REF(中轴+MACDZ,1),中轴,中轴+MACDZ,0.8,0),COLOR009600;
STICKLINE((中轴+MACDZ)<=中轴 AND (中轴+MACDZ)>REF(中轴+MACDZ,1),中轴,中轴+MACDZ,0.8,0),COLOR000096;
{}
DRAWKLINE(周高,周开,周低,周收);
{}
MA5周:MA(周收,5)COLORWHITE;
MA10周:MA(周收,10)COLORYELLOW;
MA20周:MA(周收,20)COLORMAGENTA;
MA60周:MA(周收,60)COLORGREEN;




回复

举报

QQ|

GMT+8, 2024-11-17 10:48

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