您需要 登录 才可以下载或查看,没有帐号?注册 
 如何将成交量引入双线MACD公式啊。
如何将成交量引入双线MACD公式啊。
 求高手指点!
 
 //---- indicator settings
 #property indicator_separate_window
 #property indicator_buffers 4
 #property indicator_color1 Blue
 #property indicator_color2 Red
 #property indicator_color3 Red
 #property indicator_color4 Green
 //int indicator_color3;
 //---- indicator parameters
 extern int FastEMA=12;
 extern int SlowEMA=26;
 extern int SignalEMA=9;
 //---- indicator buffers
 double   ind_buffer1[];
 double   ind_buffer2[];
 double   ind_buffer3[];
 double   ind_buffer4[];
 double   temp;
 
 //+------------------------------------------------------------------+
 //| Custom indicator initialization function                  |
 //+------------------------------------------------------------------+
 int init()
    {
 //---- drawing settings
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2);
   SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,1);
   SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,1);
   SetIndexDrawBegin(1,SignalEMA);
   IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+1);
 //---- indicator buffers mapping
   if(!SetIndexBuffer(0,ind_buffer1) !SetIndexBuffer(1,ind_buffer2) !SetIndexBuffer(2,ind_buffer3) !SetIndexBuffer(3,ind_buffer4))
     Print( cannot set indicator buffers! 
 //---- name for DataWindow and indicator subwindow label
   IndicatorShortName( MACDVOL( +FastEMA+ , +SlowEMA+ , +SignalEMA+ ) 
   SetIndexLabel(0, MACDVOL 
   SetIndexLabel(1, Signal 
 //---- initialization done
   return(0);
    }
 //+------------------------------------------------------------------+
 //| Moving Averages Convergence/Divergence                   |
 //+------------------------------------------------------------------+
 int start()
    {
   int limit;
   int counted_bars=IndicatorCounted();
 //---- check for possible errors
   if(counted_bars0) counted_bars--;
   limit=Bars-counted_bars;
 //---- macd counted in the 1-st buffer
   for(int i=0; i
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!
 客服热线:
客服热线: 手机版
 手机版 二维码
 二维码

 
  
 
        
         
        