关于mt4中求macd的斜率求帮助
关于mt4中求macd的斜率求帮助下面是macd的。。。。
//+------------------------------------------------------------------+
//| Custom MACD.mq4 |
//| Copyright ?2004, MetaQuotes Software Corp. |
//|
//+------------------------------------------------------------------+
#propertycopyright \"Copyright ?2004, MetaQuotes Software Corp.\"
#propertylink
//---- indicator settings
#propertyindicator_separate_window
#propertyindicator_buffers 2
#propertyindicator_color1Silver
#propertyindicator_color2Red
#propertyindicator_width12
//---- 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 支持你加分 支持你一下下。。 晕不信啊 好啊,,不错、、、、
继续,学习了 EA真的能赚钱么? 路过。。看下先。 dddddddddddddd 看看,看看。谢谢。你要发,我也要发。
页:
[1]