//+------------------------------------------------------------------+
//|
//|
//|
//+------------------------------------------------------------------+
#property
#property
//---- indicator settings
#property
#property
#property
#property
#property
#property
//---- indicator parameters
extern int FastEMA=12;
extern int SlowEMA=26;
extern int SignalEMA=9;
//---- indicator buffers
double
double
double
//+------------------------------------------------------------------+
//| Custom indicator initialization function
//+------------------------------------------------------------------+
int init()
//---- drawing settings
//---- indicator buffers mapping
//---- name for DataWindow and indicator subwindow label
//---- initialization done
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence
//+------------------------------------------------------------------+
int start()
//---- last counted bar will be recounted
//---- macd counted in the 1-st buffer
(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
//---- signal line counted in the 2-nd buffer
//---- done
//+------------------------------------------------------------------+
然后点击“编译”,“保存”,即完成了MACD的双线设置。
联系客服