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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[大智慧] MACD跨周期同图公式(副图、源码、贴图)


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

MACD跨周期同图公式(副图、源码、贴图)

关于箭头和颜色的含义是“箭头当数值大于昨日数值为上反之为下”红区域{数值在0轴上方“如 15分DIFF 15分DEA 15分MACD......"反之绿区域 数值在0轴下方.

DIFF:EMA(CLOSE,10) - EMA(CLOSE,22),LINETHICK0;
DEA :EMA(DIFF,7.5),LINETHICK0;
MACD :2*(DIFF-DEA),LINETHICK0;
TJ3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
TJF2:=(EMA(TJ3,3));
LC := REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
STICKLINE(RSI>80,100,98,4,0) ,Color00FF00;
STICKLINE(RSI>76,98,96,4,0) ,Color00FFFF;
STICKLINE(TJF2>80,102,100,4,0) ,COLOR0000ff;
35,COLOR777700,LINETHICK1,LAYER6;
50,COLOR007700,LINETHICK1,LAYER6;
65,COLOR995599,LINETHICK1,LAYER6;
80,COLOR007777,LINETHICK1,LAYER6;
96,COLOR777777,LINETHICK1,LAYER6;
102;
分DIFA:="MACD.DIFF#MIN5"(22,10,7.5);
分DEAA:="MACD.DEA#MIN5"(22,10,7.5);
MACC分A:=2*(分DIFA-分DEAA);
分DIFB:="MACD.DIFF#MIN15"(22,10,7.5);
分DEAB:="MACD.DEA#MIN15"(22,10,7.5);
MACC分B:=2*(分DIFB-分DEAB);
分DIFD:="MACD.DIFF#MIN30"(22,10,7.5);
分DEAD:="MACD.DEA#MIN30"(22,10,7.5);
MACC分D:=2*(分DIFD-分DEAD);
分DIFE:="MACD.DIFF#MIN60"(22,10,7.5);
分DEAE:="MACD.DEA#MIN60"(22,10,7.5);
MACC分E:=2*(分DIFE-分DEAE);
FILLRGN(80,75,分DIFB>0,RGB(96,0,0),分DIFB<0,RGB(0,50,0)),LAYER7;
FILLRGN(75,70,分DEAB>0,RGB(50,0,0),分DEAB<0,RGB(0,64,64)),LAYER7;
FILLRGN(65,70,MACC分B>0,RGB(72,0,36),MACC分B<0,RGB(0,50,100)),LAYER7;
FILLRGN(60,65,分DIFD>0,RGB(96,0,0),分DIFD<0,RGB(0,50,0)),LAYER7;
FILLRGN(55,60,分DEAD>0,RGB(55,0,0),分DEAD<0,RGB(0,64,64)),LAYER7;
FILLRGN(55,50,MACC分D>0,RGB(72,5,3),MACC分D<0,RGB(0,0,80)),LAYER7;
FILLRGN(50,45,分DIFE>0,RGB(96,0,0),分DIFE<0,RGB(0,50,0)),LAYER7;
FILLRGN(45,40,分DEAE>0,RGB(45,0,0),分DEAE<0,RGB(0,64,64)),LAYER7;
FILLRGN(40,35,MACC分E>0,RGB(70,0,34),MACC分E<0,RGB(0,45,0)),LAYER7;
DRAWFLAGTEXT(CROSS(分DEAD,分DIFD) AND 分DIFD>0,62,'DIFF>0:30分死叉');
DRAWFLAGTEXT(CROSS(分DIFD,分DEAD) AND 分DIFD<0,56,'DIFF<0:30分金叉');
DRAWFLAGTEXT(CROSS(分DIFD,分DEAD),54,':30分金叉');
DRAWFLAGTEXT(CROSS(分DEAE,分DIFE) AND 分DIFE>0,47,'DIFF>0:60分死叉');
DRAWFLAGTEXT(CROSS(分DIFE,分DEAE) AND 分DIFE<0,42,'DIFF<0:60分金叉');
DRAWFLAGTEXT(CROSS(分DIFE,分DEAE),39,':60分金叉');
PARTLINE(77,CROSS(分DIFB,分DEAB) AND 分DIFB<0,RGB(255,222,2)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(77,CROSS(分DIFB,分DEAB) AND 分DIFB>0,RGB(255,22,0)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(74,CROSS(分DIFB,分DEAB),RGB(255,2,255)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(62,CROSS(分DEAD,分DIFD) AND 分DIFD>0,RGB(2,252,0)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(59,CROSS(分DEAD,分DIFD),RGB(2,245,12)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(56,CROSS(分DIFD,分DEAD) AND 分DIFD<0,RGB(255,252,2)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(54,CROSS(分DIFD,分DEAD),RGB(255,2,255)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(47,CROSS(分DEAE,分DIFE) AND 分DIFE>0,RGB(2,252,0)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(44,CROSS(分DEAE,分DIFE),RGB(2,245,12)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(42,CROSS(分DIFE,分DEAE) AND 分DIFE<0,RGB(255,252,2)),CROSSDOT,LINETHICK3,LAYER7;
PARTLINE(39,CROSS(分DIFE,分DEAE),RGB(255,2,255)),CROSSDOT,LINETHICK3,LAYER7;
BLT:=BARSTATUS=2;
DRAWTEXT(BLT AND IF(分DIFA>REF(分DIFA,1),分DIFA,分DIFA),95,'5分DIFF'),Color999999,ALIGN0;
DRAWICON(c,95,IF(分DIFA>REF(分DIFA,1),7,8)),ALIGN2;
DRAWTEXT(BLT AND IF(分DEAA>REF(分DEAA,1),分DEAA,分DEAA),90,'5分DEA'),Color999999,ALIGN0;
DRAWICON(c,90,IF(分DEAA>REF(分DEAA,1),7,8)),ALIGN2;
DRAWTEXT(BLT AND IF(MACC分A<0,MACC分A,MACC分A),85,'5分MACD'),Color999999,ALIGN0;
DRAWICON(c,85,IF(MACC分A>REF(MACC分A,1),7,8)),ALIGN2;
DRAWTEXT(BLT AND IF(分DIFB>REF(分DIFB,1),分DIFB,分DIFB),80,'15分DIFF'),Color009999,ALIGN0;
DRAWICON(c,80,IF(分DIFB<REF(分DIFB,1),8,7)),ALIGN2;
DRAWTEXT(BLT AND IF(分DEAB>REF(分DEAB,1),分DEAB,分DEAB),75,'15分DEA'),Color009999,ALIGN0;
DRAWICON(c,75,IF(分DEAB<REF(分DEAB,1),8,7)),ALIGN2;
DRAWTEXT(BLT AND IF(MACC分B<0,MACC分B,MACC分B),70,'15分MACD'),Color009999,ALIGN0;
DRAWICON(c,70,IF(MACC分B<REF(MACC分B,1),8,7)),ALIGN2;
DRAWTEXT(BLT AND IF(分DIFD>REF(分DIFD,1),分DIFD,分DIFD),65,'30分DIFF'),Color997799,ALIGN0;
DRAWICON(c,65,IF(分DIFD<REF(分DIFD,1),8,7)),ALIGN2;
DRAWTEXT(BLT AND IF(分DEAD>REF(分DEAD,1),分DEAD,分DEAD),60,'30分DEA'),Color997799,ALIGN0;
DRAWICON(c,60,IF(分DEAD<REF(分DEAD,1),8,7)),ALIGN2;
DRAWTEXT(BLT AND IF(MACC分D<0,MACC分D,MACC分D),55,'30分MACD'),Color997799,ALIGN0;
DRAWICON(c,55,IF(MACC分D<REF(MACC分D,1),8,7)),ALIGN2;
DRAWTEXT(BLT AND IF(分DIFE>REF(分DIFE,1),分DIFE,分DIFE),50,'60分DIFF'),Color009900,ALIGN0;
DRAWICON(c,50,IF(分DIFE<REF(分DIFE,1),8,7)),ALIGN2;
DRAWTEXT(BLT AND IF(分DEAE>REF(分DEAE,1),分DEAE,分DEAE),45,'60分DEA'),Color009900,ALIGN0;
DRAWICON(c,45,IF(分DEAE<REF(分DEAE,1),8,7)),ALIGN2;
DRAWTEXT(BLT AND IF(MACC分E<0,MACC分E,MACC分E),40,'60分MACD'),Color009900,ALIGN0;
DRAWICON(c,40,IF(MACC分E>=REF(MACC分E,1),7,8)),ALIGN2;
 


 




 



gd13279

回复

举报

QQ|

GMT+8, 2024-11-18 09:40

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