[MT4指标]MACD指标的几种变形
2楼 
MACD 双线三色
#property  indicator_separate_window
#property  indicator_buffers 5
#property  indicator_color1  MidnightBlue
#property  indicator_color2  Red
#property  indicator_color3  Green
#property  indicator_color4  Yellow
#property  indicator_width1  1
extern int FastEMA=12;
extern int SlowEMA=26;
extern int SignalSMA=9;
double     MacdBuffer0;
double     MacdBuffer1;
double     MacdBuffer2;
double     SignalBuffer;
double     MacdBuffer;
int init()
  {
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexStyle(1,DRAW_HISTOGRAM);
   SetIndexStyle(2,DRAW_HISTOGRAM);
   SetIndexStyle(3,DRAW_LINE);
   SetIndexStyle(4,DRAW_NONE);
   SetIndexDrawBegin(3,SignalSMA);
   IndicatorDigits(Digits+1);
   SetIndexBuffer(0,MacdBuffer0);
   SetIndexBuffer(1,MacdBuffer1);
   SetIndexBuffer(2,MacdBuffer2);
   SetIndexBuffer(3,SignalBuffer);
   SetIndexBuffer(4,MacdBuffer);
   IndicatorShortName("MACD("+FastEMA+","+SlowEMA+","+SignalSMA+")");
   SetIndexLabel(0,"MACD");
   SetIndexLabel(1,"MACD");
   SetIndexLabel(2,"MACD");   
   SetIndexLabel(3,"Signal");
//   SetIndexLabel(4,"MACD");   
   return(0);
  }
int start()
  {
   int limit;
   int counted_bars=IndicatorCounted();
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   for(int i=0; i=0 && MacdBuffer>=SignalBuffer) 
         {MacdBuffer1=MacdBuffer; MacdBuffer2=0;MacdBuffer0=0;}
      if(MacdBuffer<=0 && MacdBuffer<=SignalBuffer) 
         {MacdBuffer2=MacdBuffer; MacdBuffer1=0;MacdBuffer0=0;}
      if((MacdBuffer>=0 && MacdBufferSignalBuffer))
         {MacdBuffer0=MacdBuffer; MacdBuffer1=0;MacdBuffer2=0;}
    }
    
    return(0);
  }
[ 本帖最后由 爆爆熊 于 2007-5-9 19:05 编辑 ]  
www.talkforex.com/blog//index.php?action/space/uid/39428
发表于:2007-05-11 12:26只看该作者
3楼 
多謝爆爆熊:)
韬客社区www.talkfx.co
发表于:2007-05-24 00:46只看该作者
4楼 
爆爆熊有没有三色双线的MACD的代码,谢谢!
韬客社区www.talkfx.co
5楼 
www.talkforex.com/blog//index.php?action/space/uid/39428
发表于:2007-05-24 10:30只看该作者
6楼 
爆爆熊,可不可以加一根EMA9的线,在MACD3线2色上形成金叉或死叉。谢谢!
韬客社区www.talkfx.co
发表于:2007-05-27 00:45只看该作者
8楼 
楼主你好,有没有跨时区的三线双色或三色双线的MACD?
韬客社区www.talkfx.co
9楼 
跨时区是什么概念啊?
是不是4小时图、小时图等图上显示日线图上的MACD?
www.talkforex.com/blog//index.php?action/space/uid/39428
发表于:2007-05-31 05:32只看该作者
10楼 
是的。。。。我有跨时区的MACD,但没有三线双色或三色双线的,有吗
11楼 
原帖由 东南风 于 2007-5-31 13:32 发表 是的。。。。我有跨时区的MACD,但没有三线双色或三色双线的,有吗
www.talkforex.com/blog//index.php?action/space/uid/39428
12楼 
日图与4小时图比较 EUR_H4.gif
EUR_H4.gif EUR_D1.gif
EUR_D1.gif
 EUR_H4.gif
EUR_H4.gif EUR_D1.gif
EUR_D1.gifwww.talkforex.com/blog//index.php?action/space/uid/39428
发表于:2007-05-31 10:55只看该作者
13楼 
谢谢指教。。。
韬客社区www.talkfx.co
发表于:2007-10-08 07:22只看该作者
14楼 
好啊,谢谢楼主的无私!!!
韬客社区www.talkfx.co
发表于:2009-11-07 02:46只看该作者
15楼 
这里高手好多啊  学习了 多谢了 爱死你们了 啊哈哈
韬客社区www.talkfx.co
发表于:2011-04-17 14:59只看该作者
16楼 
dddddddddddddddddddddddddddddddddddd
韬客社区www.talkfx.co
发表于:2011-04-25 02:50只看该作者
17楼 
学习~~~
韬客社区www.talkfx.co
发表于:2011-05-17 09:25只看该作者
18楼 
很好,不过附件怎么都不能下载了?
请叫我预言师
发表于:2011-05-17 11:16只看该作者
19楼 
爆爆熊,能否将这几个指标的代码贴出来呢?谢谢









 MACD.gif
MACD.gif






























