顺水外汇EA交易网MT4
标题:
下了个MACD多周期重叠共振指标,MT4里面根本打不开!
[打印本页]
作者:
mlzj1993
时间:
2018-1-11 14:56
标题:
下了个MACD多周期重叠共振指标,MT4里面根本打不开!
原帖在此http://bbs.520fx.com/forum.php?m ... &authorid=12556,扣了两次金币,文件在MT4下面是看不到的,不知道啥问题,有这个指标可用的朋友能分享下吗?
作者:
wwqfyr520
时间:
2018-1-11 16:03
只要把最后的
“ ExtMapBuffer8[i]=(iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,i)/MACD_FactorM1);
}
}
//----
return(0);
//+-------------------------------------------”
改为
“ ExtMapBuffer8[i]=(iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,i)/MACD_FactorM1);
}
}
//---- return(0);
//+-------------------------------------------”
就可以用了
作者:
mlzj1993
时间:
2018-1-11 16:29
现在把文件共享下,会编写的朋友能帮忙弄下吗?
作者:
mlzj1993
时间:
2018-1-11 17:30
//+------------------------------------------------------------------+
//| MACD# MTF.mq4 |
//| Copyright ?2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2006, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property link "cja"
#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 Red
#property indicator_color3 DeepSkyBlue
#property indicator_color4 DeepSkyBlue
#property indicator_color5 LawnGreen
#property indicator_color6 LawnGreen
#property indicator_color7 Orange
#property indicator_color8 Orange
#property indicator_width1 1
#property indicator_style2 2
#property indicator_width3 1
#property indicator_style4 2
#property indicator_width5 1
#property indicator_style6 2
#property indicator_width7 1
#property indicator_style8 2
#property indicator_level1 0
//---- input parameters
extern int FastEMA=12; //8 Faster settings
extern int SlowEMA=26; //17
extern int SignalSMA=9; //9
// Different Currencies may need different Factors to help
// separate the different MACD lines - raise the Factor # on the
// largest moving MACD lines to enlarge the view of the other 3 MACD Timeframes.
extern double MACD_FactorH1 =12;
extern double MACD_FactorM15=6;
extern double MACD_FactorM5=2;
extern double MACD_FactorM1=1;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{ IndicatorShortName("MACD MTF");
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,ExtMapBuffer7);
SetIndexStyle(7,DRAW_LINE);
SetIndexBuffer(7,ExtMapBuffer8);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
IndicatorShortName("MACD MTF");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
// Start of LABELS
double MyFValue = Period();
ObjectCreate("MACDMTF4", OBJ_LABEL, WindowFind("MACD MTF"), 0, 0);
ObjectSetText("MACDMTF4",DoubleToStr(MyFValue,Digits-4), 15, "Arial", DarkTurquoise);
ObjectSet("MACDMTF4", OBJPROP_CORNER, 0);
ObjectSet("MACDMTF4", OBJPROP_XDISTANCE, 430);
ObjectSet("MACDMTF4", OBJPROP_YDISTANCE, 0);
ObjectCreate("MACDMTF5", OBJ_LABEL, WindowFind("MACD MTF"), 0, 0);//1hr
ObjectSetText("MACDMTF5","Curr Period", 12, "Arial",DarkTurquoise);
ObjectSet("MACDMTF5", OBJPROP_CORNER, 0);
ObjectSet("MACDMTF5", OBJPROP_XDISTANCE, 340);
ObjectSet("MACDMTF5", OBJPROP_YDISTANCE, 0);
ObjectCreate("MACDMTF", OBJ_LABEL, WindowFind("MACD MTF"), 0, 0);//1hr
ObjectSetText("MACDMTF","H1", 15, "Arial",Red );
ObjectSet("MACDMTF", OBJPROP_CORNER, 0);
ObjectSet("MACDMTF", OBJPROP_XDISTANCE, 540);
ObjectSet("MACDMTF", OBJPROP_YDISTANCE, 0);
ObjectCreate("MACDMTF1", OBJ_LABEL, WindowFind("MACD MTF"), 0, 0);//15min
ObjectSetText("MACDMTF1","M15", 15, "Arial", DodgerBlue);
ObjectSet("MACDMTF1", OBJPROP_CORNER, 0);
ObjectSet("MACDMTF1", OBJPROP_XDISTANCE, 580);
ObjectSet("MACDMTF1", OBJPROP_YDISTANCE, 0);
ObjectCreate("MACDMTF2", OBJ_LABEL, WindowFind("MACD MTF"), 0, 0);//5min
ObjectSetText("MACDMTF2","M5", 15, "Arial", Chartreuse);
ObjectSet("MACDMTF2", OBJPROP_CORNER, 0);
ObjectSet("MACDMTF2", OBJPROP_XDISTANCE, 640);
ObjectSet("MACDMTF2", OBJPROP_YDISTANCE, 0);
ObjectCreate("MACDMTF3", OBJ_LABEL, WindowFind("MACD MTF"), 0, 0);//1min
ObjectSetText("MACDMTF3","M1", 15, "Arial",Orange );
ObjectSet("MACDMTF3", OBJPROP_CORNER, 0);
ObjectSet("MACDMTF3", OBJPROP_XDISTANCE, 690);
ObjectSet("MACDMTF3", OBJPROP_YDISTANCE, 0);
// End of LABELS
//----
for(int i=Bars;i>=0;i--){
ExtMapBuffer1[i]=(iMACD(NULL,PERIOD_H1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,i)/MACD_FactorH1);
ExtMapBuffer2[i]=(iMACD(NULL,PERIOD_H1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,i)/MACD_FactorH1);
ExtMapBuffer3[i]=(iMACD(NULL,PERIOD_M15,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,i)/MACD_FactorM15);
ExtMapBuffer4[i]=(iMACD(NULL,PERIOD_M15,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,i)/MACD_FactorM15);
ExtMapBuffer5[i]=(iMACD(NULL,PERIOD_M5,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,i)/MACD_FactorM5);
ExtMapBuffer6[i]=(iMACD(NULL,PERIOD_M5,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,i)/MACD_FactorM5);
ExtMapBuffer7[i]=(iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,i)/MACD_FactorM1);
ExtMapBuffer8[i]=(iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,i)/MACD_FactorM1);
}
}
//----
return(0);
//+-------------------------------------------
作者:
mlzj1993
时间:
2018-1-11 18:31
源码如上,但是用MT4编写出现错误,不能通过!然后我是小白,特来救助!
作者:
forexwxh
时间:
2018-1-11 19:32
拿去用吧
作者:
jiuhongzhi
时间:
2018-1-11 20:26
[attach]20803[/attach]
作者:
jiuhongzhi
时间:
2018-1-11 22:00
与楼主的图不一样?
[attach]20804[/attach]
[attach]20805[/attach]
作者:
雪豹魂
时间:
2018-1-11 23:09
这好像是MACD多周期共振报警的指标,只报警不显示指标的
作者:
mlzj1993
时间:
2018-1-12 00:30
试了还是不行,可能我不会吧!但是还是非常感谢!
作者:
mlzj1993
时间:
2018-1-12 01:33
弄好了谢谢!是自己不会!非常感谢!
作者:
mlzj1993
时间:
2018-1-12 02:47
谢谢各位坛友,终于弄好了,谢谢!发上来给有需要的朋友共享!
作者:
aijiuyihui
时间:
2018-1-12 03:12
ssssssssssssssssssssssssssss
作者:
sunshine3003
时间:
2018-1-12 03:58
不错嘛,下载后试试
作者:
zhjian117
时间:
2018-1-12 04:27
还差已经比;饿。。
欢迎光临 顺水外汇EA交易网MT4 (http://waterforex.com/)
Powered by Discuz! X3.2