您现在的位置:好股网 >> 股票公式 >> 通达信公式

看盘MACD(副图 源码)

[下载地址]
  • 更新时间:2015-09-10 21:14:00
  • 指标功能:国产软件
  • 公式大小:3.00 KB
  • 解压密码:goodgupiao
  • 推荐星级:
  • 授权方式:共享版
  • 公式分类:通达信公式
  • 指标类型:简体中文
  • 运行环境:Win2000/WinXP/Win2003/
  • 所需积分:0
  • 相关Tags:

看盘MACD(副图 源码)介绍

好股网(www.goodgupiao.com)提示:您正在下载的是:看盘MACD(副图 源码)

{MACD}

DIF:(EMA(CLOSE,12)-EMA(CLOSE,26)),COLORFF00FF;
DEA:EMA(DIF,9),COLORCCC555;
MACD:(DIF-DEA)*2,COLORSTICK;
MACD2:=MA(MACD,4);
判断顶背:=IF(CROSS(DEA,DIF),HHV(DIF,10),REF(HHV(DIF,10),BARSLAST(CROSS(DEA,DIF))));
判断底背:=IF(CROSS(DIF,DEA),LLV(DIF,10),REF(LLV(DIF,10),BARSLAST(CROSS(DIF,DEA))));
{MACD红绿天和面积}
红天:IF(MACD>=0,BARSLAST(CROSS(MACD,0))+1,0),COLOR0000FF,NODRAW;
绿天:IF(MACD<0,BARSLAST(CROSS(0,MACD))+1,0),COLOR00FF00,NODRAW;
红柱面积:IF(红天>0,SUM(MACD,BARSLAST(CROSS(MACD,0))+1),0),COLOR0000FF,NODRAW;
绿柱面积:IF(绿天>0,SUM(MACD,BARSLAST(CROSS(0,MACD))+1),0),COLOR00FF00,NODRAW;

DF低位金叉:=CROSS(DIF,DEA) AND DIF<0;
DF金叉周期:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
DF上次金叉:=BARSLAST(REF(CROSS(DIF,DEA),1));
MD底背离:=REF(LLV(L,5),DF上次金叉+1)>LLV(L,5) AND LLV(MACD,5)>REF(LLV(MACD,5),DF上次金叉+1) AND CROSS(DIF,DEA);
DF二次金叉1:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(DF金叉周期=2,21)=1;
DF二次金叉:=DF二次金叉1 AND MD底背离;
DF底背离:=REF(LLV(L,5),DF上次金叉+1)>LLV(L,5) AND DIF>REF(DIF,DF上次金叉+1) AND CROSS(DIF,DEA);
DF上次死叉:=BARSLAST(REF(CROSS(DEA,DIF),1));
DF顶背离:=REF(HHV(C,5),DF上次死叉+1)<H AND REF(DIF,DF上次死叉+1)>DIF AND CROSS(DEA,DIF);
绿柱短了:=(MACD>REF(MACD,1) AND DIF<DEA) AND COUNT(MACD>REF(MACD,1) AND DIF<DEA,10)=1 AND C>MA(C,55) AND COUNT(MACD<0,5)>=5;

DIFZ:=MACD.DIF#WEEK;
DEAZ:=MACD.DEA#WEEK;
DIFR:=MACD.DIF#DAY;
DEAR:=MACD.DEA#DAY;

WEKZ:=REFX(WEEKDAY<REF(WEEKDAY,1) OR DATETODAY(DATE)-DATETODAY(REF(DATE,1))>=7,1) OR ISLASTBAR;
WEKR:=REFX(DATETODAY(DATE)-DATETODAY(REF(DATE,1))>=7 OR DAYTODATE(HOUR)-DAYTODATE(REF(HOUR,1))>=4,3) OR ISLASTBAR;
WEKM:=REFX(DATETODAY(DATE)-DATETODAY(REF(DATE,1))>=7 OR DAYTODATE(HOUR)-DAYTODATE(REF(HOUR,1))>=8,7) OR ISLASTBAR;
WEKF:=REFX(DATETODAY(DATE)-DATETODAY(REF(DATE,1))>=7 OR DAYTODATE(HOUR)-DAYTODATE(REF(HOUR,1))>=16,15) OR ISLASTBAR;
DIFDD:=IF(PERIOD=5 AND WEKZ,DIFZ,IF(PERIOD=4 AND WEKR,DIFR,IF(PERIOD=3 AND WEKM,DIFR,IF(PERIOD=2 AND WEKF,DIFR,DRAWNULL))));
DEADD:=IF(PERIOD=5 AND WEKZ,DEAZ,IF(PERIOD=4 AND WEKR,DEAR,IF(PERIOD=3 AND WEKM,DEAR,IF(PERIOD=2 AND WEKF,DEAR,DRAWNULL))));
WDIF:ALIGNRIGHT(DIFDD),NODRAW,COLOR00FF99;
WDEA:ALIGNRIGHT(DEADD),NODRAW,COLOR00FF99;
WMAC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+CSTA1,RGB(105,46,56),WDEA*CSTQ+CSTA1,RGB(0,108,108));

{柱子}
STICKLINE(HL乖离10>=20 AND REF(K>85,1) AND K<REF(K,1) AND H>REF(H,1),MACD,0,4,0),COLOR00FF00;

STICKLINE(ZMACD>0 AND ZMACD>=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,3,0),COLOR6060EE;
STICKLINE(ZMACD>0 AND ZMACD>=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,1.6,0),COLOR7070EE;
STICKLINE(ZMACD>0 AND ZMACD>=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,0.8,0),COLOR8080EE;
STICKLINE(ZMACD>0 AND ZMACD<=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,3,0),COLORA0A0A0;
STICKLINE(ZMACD>0 AND ZMACD<=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,1.8,0),COLORB0B0B0;
STICKLINE(ZMACD>0 AND ZMACD<=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,0.8,0),COLORC0C0C0;
STICKLINE(ZMACD<0 AND ZMACD>=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,3,0),COLOR003399;
STICKLINE(ZMACD<0 AND ZMACD>=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,1.6,0),COLOR114499;
STICKLINE(ZMACD<0 AND ZMACD>=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,0.8,0),COLOR225599;
STICKLINE(ZMACD<0 AND ZMACD<=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,3,0),COLORDDD000;
STICKLINE(ZMACD<0 AND ZMACD<=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,1.8,0),COLOREEE000;
STICKLINE(ZMACD<0 AND ZMACD<=REF(ZMACD,1),ZMACD*CSTQ+CSTA1,CSTA1,0.8,0),COLORFFF000;

STICKLINE(MACD>0 AND MACD>=REF(MACD,1),MACD,0,2,0),COLOR0000DD;
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),MACD,0,1.2,0),COLOR0000EE;
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),MACD,0,0.4,0),COLOR0000FF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2,0),COLORFF8888;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,1.2,0),COLORFF9999;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,0.4,0),COLORFFAAAA;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),MACD,0,2,0),COLOR000077;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),MACD,0,1.2,0),COLOR000088;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1) ,MACD,0,0.4,0),COLOR000099;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,2,0),COLOR005500;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,1.2,0),COLOR006600;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,0.4,0),COLOR007700;

STICKLINE(DF二次金叉,0,DIF,3,0),COLORFF00FF;

临界柱H:=FILTER(COUNT(MACD>REF(MACD,1) AND MACD>0,6)=6,3) OR FILTER(COUNT(MACD<REF(MACD,1) AND MACD>0,6)=6,3);
临界柱L:=FILTER(COUNT(MACD<REF(MACD,1) AND MACD<0,6)=6,3) OR FILTER(COUNT(MACD>REF(MACD,1) AND MACD<0,6)=6,3);
STICKLINE(临界柱H,MACD,0,0,0),COLOR00FFFF;
STICKLINE(临界柱L,MACD,0,0,0),COLOR00FFFF;


STICKLINE(DF底背离,0,判断底背,1,0),COLOR990099;
STICKLINE(DF底背离 AND COUNT(DF底背离,30)=2,0,判断底背,1,0),COLOR00FFFF;

STICKLINE(绿柱短了,0,-MACD/2,1,0),COLOR00FFFF;

DRAWTEXT(DF二次金叉,DIF,' 二金'),COLOR00AAFF;
DRAWTEXT(DF底背离,REF(判断底背,1),' 底背'),COLOR00FF00;


STICKLINE(JJZR<=3,(CONHH*1.15),(CONHH*1.25),4,0),COLOR00FFFF;
STICKLINE(KKZR<25,(CONHH*1.18),(CONHH*1.22),3,0),COLORFF00FF;
STICKLINE(KKZR>=25,(CONHH*1.18),(CONHH*1.22),3,0),COLORC050AA;
STICKLINE(KKZR>=40,(CONHH*1.18),(CONHH*1.22),3,0),COLORBBBBBB;
STICKLINE(KKZR>=60,(CONHH*1.18),(CONHH*1.22),3,0),COLOR0000FF;
STICKLINE(KKZR>=80,(CONHH*1.18),(CONHH*1.22),3,0),COLOR00FFFF;
STICKLINE(KKZR>=90,(CONHH*1.18),(CONHH*1.22),3,0),COLOR00FF00;
DRAWICON(KDJJC,(CONHH*1.18),24);
DRAWICON(KDJXC,(CONHH*1.18),15);

STICKLINE(J<=3,(CONHH*1.01),(CONHH*1.12),4,0),COLOR00FFFF;
STICKLINE(K<25,(CONHH*1.05),(CONHH*1.1),3,0),COLORFF00FF;
STICKLINE(K>=25,(CONHH*1.05),(CONHH*1.1),3,0),COLORC050AA;
STICKLINE(K>=40,(CONHH*1.05),(CONHH*1.1),3,0),COLORBBBBBB;
STICKLINE(K>=60,(CONHH*1.05),(CONHH*1.1),3,0),COLOR0000FF;
STICKLINE(K>=80,(CONHH*1.05),(CONHH*1.1),3,0),COLOR00FFFF;
STICKLINE(K>=90,(CONHH*1.05),(CONHH*1.1),3,0),COLOR00FF00;
DRAWICON(CROSS(K,D),(CONHH*1.08),1);
DRAWICON(CROSS(D,K),(CONHH*1.08),2);


WDIF*CSTQ+CSTA1,COLORFFFFFF,DOTLINE;
WDEA*CSTQ+CSTA1,COLOR00FF99,DOTLINE;

IF(C>0,0,DRAWNULL),COLORBROWN;
K1:=BACKSET(DIF>REF(DIF,1),2);
强DIF:IF(K1,DIF,DRAWNULL),COLORRED;
K2:=BACKSET(DIF<REF(DIF,1),2);
弱DIF:IF(K2,DIF,DRAWNULL),COLORFF8B80;
K3:=BACKSET(DEA>REF(DEA,1),2);
强DEA:IF(K3,DEA,DRAWNULL),COLORLIRED;
K4:=BACKSET(DEA<REF(DEA,1),2);
弱DEA:IF(K4,DEA,DRAWNULL),COLORFF8B80;
底拐:=DRAWLINE(DIF>=HHV(DIF,21),DIF,DIF<=LLV(DIF,21),DIF,1),COLORWHITE,POINTDOT;
DRAWICON(强DIF>底拐 AND REF(DIF,1)=REF(底拐,1) AND REF(DIF,2)>REF(DIF,1),0,1);


 

看盘MACD(副图 源码)

看盘MACD(副图 源码)

 


好股网(www.goodgupiao.com)提醒您:股市有风险,投资需谨慎。
看盘MACD(副图 源码)下载地址
下载必看(为了保障您的权益,请在下载指标前务必看清楚相关说明)
  • 网站注册、找回密码、下载过程遇到问题,请您联系,我们会在第一时间指导反馈。
  • 积分指标使用遇到问题,如指标安装不成功或指标介绍的特点与实际发布的不符,请联系好股网客服进行问题处理。
  • 指标来源网络收集和会员提供,不保证提供的下载资源的准确性、安全性和完整性。请自行谨慎甄别公式相关描述后再下载,好股网不保障和承担使用该指标公式投资带来的一切损失。
  • 指标仅供学习和研究使用,不得用于商业或者非法用途。本站对于提供下载的指标、软件等不拥有任何权利,其版权归该下载资源的合法拥有者所有,如有侵犯您的版权,请查看《侵权投诉》,本站将移除相关内容。
更多最新置顶指标公式
相关说明
  • 目前市场常用软件有通达信、大智慧等,通达信版本从高到低的指标格式有tn6、tne、tni,股票池格式为XML。大智慧指标格式有fnc,股票池格式为XML。
  • 通达信指标导入安装快捷方法:快捷键CTRL+F > 公式管理器面板 导入公式 > 选择要导入的公式 打开 > 在导入公式面板中 勾选公式,确定。
  • 通达信指标呈现快捷方法:点击指标面板要显示的主图或副图,快捷键CTRL+I > 选择指标,确定。
  • alg格式股票公式,仅仅可以用飞狐交易师股票软件引入使用;
  • fnc格式股票公式,可以用大智慧新一代高速行情分析系统股票软件使用,少部分可以用分析家股票软件引入使用;
  • exp格式股票公式,仅可以用大智慧经典版股票软件引入使用;
  • tnctni格式股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
  • tn6格式公式,仅可以用通达信公式编辑器5.0版导入,高版本兼容低版本;
  • hxf格式股票公式,仅可以用同花顺股票软件引入使用。
  • 如果引入公式的时候,发现公式名称栏空白,调整电脑时间到1997年,能出现公式名称并正常显示,可能是公式使用期限已过。
  • 如果您发现下载链接错误,请点击报告错误谢谢!