9评论

0收藏

关于mt4中求macd的斜率求帮助

avatar 文静 | 4739 人阅读 | 9 人评论 | 2011-10-05

关于mt4中求macd的斜率求帮助
  下面是macd的。。。。
  //+------------------------------------------------------------------+
  //|                                                  Custom MACD.mq4 |
  //|                      Copyright ?2004, MetaQuotes Software Corp. |
  //|                                       
  //+------------------------------------------------------------------+
  #property  copyright \"Copyright ?2004, MetaQuotes Software Corp.\"
  #property  link     
  //---- indicator settings
  #property  indicator_separate_window
  #property  indicator_buffers 2
  #property  indicator_color1  Silver
  #property  indicator_color2  Red
  #property  indicator_width1  2
  //---- indicator parameters
  extern int FastEMA=12;
  extern int SlowEMA=26;
  extern int SignalSMA=9;
  //---- indicator buffers
  double     MacdBuffer[];
  double     SignalBuffer[];
  
  //+------------------------------------------------------------------+
  //| Custom indicator initialization function                         |
  //+------------------------------------------------------------------+
  int init()
    {
  //---- drawing settings
     SetIndexStyle(0,DRAW_HISTOGRAM);
     SetIndexStyle(1,DRAW_LINE);
     SetIndexDrawBegin(1,SignalSMA);
     IndicatorDigits(Digits+1);
  //---- indicator buffers mapping
     SetIndexBuffer(0,MacdBuffer);
     SetIndexBuffer(1,SignalBuffer);
  //---- name for DataWindow and indicator subwindow label
     IndicatorShortName(\"MACD(\"+FastEMA+\",\"+SlowEMA+\",\"+SignalSMA+\")\");
     SetIndexLabel(0,\"MACD\");
     SetIndexLabel(1,\"Signal\");
  //---- initialization done
     return(0);
    }
  //+------------------------------------------------------------------+
  //| Moving Averages Convergence/Divergence                           |
  //+------------------------------------------------------------------+
  int start()
    {
     int limit;
     int counted_bars=IndicatorCounted();
  //---- last counted bar will be recounted
     if(counted_bars>0) counted_bars--;
     limit=Bars-counted_bars;
  //---- macd counted in the 1-st buffer
     for(int i=0; i
""
还没有人打赏,支持一下

评论|共 9 个

小西点金

发表于 2012-11-21 23:00:05 | 显示全部楼层

支持你加分  

加Q2219910020

发表于 2012-11-21 23:00:05 | 显示全部楼层

支持你一下下。。  

自然的味道

发表于 2012-11-21 23:00:05 | 显示全部楼层

晕  不信啊  

机器人

发表于 2012-11-21 23:00:05 | 显示全部楼层

好啊,,不错、、、、  

哈哈哈

发表于 2014-11-7 15:00:08 | 显示全部楼层


继续,学习了

小嘴

发表于 2014-11-8 09:28:30 | 显示全部楼层

EA真的能赚钱么?

yiyang

发表于 2014-11-8 10:13:39 | 显示全部楼层

路过。。看下先。

amm308

发表于 2014-11-8 10:14:58 | 显示全部楼层

dddddddddddddd

yhwlwj

发表于 2014-11-8 10:19:51 | 显示全部楼层

看看,看看。谢谢。你要发,我也要发。

您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则