请牛版老师看看这个指标哪里出了问题

楼主  收藏   举报   帖子创建时间:  2019-05-05 13:40 回复:0 关注量:435
这个指标我今天在网上看到的,看上去挺不错,下载安装后,打开时MT4显示没有反应,然后MT4动不了了,不知道怎么回事,请老师帮忙看看是哪里出了问题,然后改改,谢谢!
                2012-8-17 14:41 上传
  下载附件 (21.21 KB)   
  
  
      
  游客,如果您要查看本帖隐藏内容请回复

  • #property indicator_chart_window
  • #property indicator_buffers 2
  • #property indicator_color1 MediumBlue
  • #property indicator_color2 Crimson


  • extern bool Emailalert=true;
  • extern bool Audioalert=false;

  • //---- buffers
  • double ExtMapBuffer1[];
  • double ExtMapBuffer2[];

  • //+------------------------------------------------------------------+
  • //| Custom indicator initialization function |
  • //+------------------------------------------------------------------+
  • int init()
  • {
  • //---- indicators
  • SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID, 2);
  • SetIndexArrow(0,233);
  • SetIndexBuffer(0,ExtMapBuffer1);
  • SetIndexEmptyValue(0,0.0);
  • SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID, 2);
  • SetIndexArrow(1,234);
  • SetIndexBuffer(1,ExtMapBuffer2);
  • SetIndexEmptyValue(1,0.0);


  • //----
  • return(0);
  • }
  • //+------------------------------------------------------------------+
  • //| Custom indicator deinitialization function |
  • //+------------------------------------------------------------------+
  • int deinit()
  • {
  • //----

  • //----
  • return(0);
  • }
  • //+------------------------------------------------------------------+
  • //| Custom indicator iteration function |
  • //+------------------------------------------------------------------+
  • int start()
  • {

  • int shift;
  • bool up1,up2,down1,down2;
  • for(shift=Bars-1;shift>=0;shift--)
  • {

  • ExtMapBuffer1[shift] = 0; ExtMapBuffer2[shift] = 0;

  • double tlbuy=iCustom(NULL,0,"TrendLord",50,1,shift);
  • double tlsell=iCustom(NULL,0,"TrendLord",50,2,shift);

  • double haOpen = iCustom(NULL,0,"Heiken Ashi",2,shift);
  • double haClose = iCustom(NULL,0,"Heiken Ashi",3,shift);

  • double wbuy=iCustom(NULL,0,"W-LNX",14,6,25,true,50,14,34,14,14,6,14,6,14,6,14,6,14,6,14,6,14,6,6,shift);
  • double wsell=iCustom(NULL,0,"W-LNX",14,6,25,true,50,14,34,14,14,6,14,6,14,6,14,6,14,6,14,6,14,6,7,shift);

  • double tlbuy2=iCustom(NULL,0,"TrendLord",50,1,shift+1);
  • double tlsell2=iCustom(NULL,0,"TrendLord",50,2,shift+1);

  • double haOpen2 = iCustom(NULL,0,"Heiken Ashi",2,shift+1);
  • double haClose2 = iCustom(NULL,0,"Heiken Ashi",3,shift+1);

  • double wbuy2=iCustom(NULL,0,"W-LNX",14,6,25,true,50,14,34,14,14,6,14,6,14,6,14,6,14,6,14,6,14,6,6,shift+1);
  • double wsell2=iCustom(NULL,0,"W-LNX",14,6,25,true,50,14,34,14,14,6,14,6,14,6,14,6,14,6,14,6,14,6,7,shift+1);

  • if (haOpen0 && tlsell==EMPTY_VALUE) && wbuy!=EMPTY_VALUE) up1=true; else up1=false;
  • if (haOpen>haClose && (tlbuy==EMPTY_VALUE && tlsell>0)&& wsell!=EMPTY_VALUE ) down1=true; else down1=false;

  • if (haOpen20 && tlsell2==EMPTY_VALUE) && wbuy2!=EMPTY_VALUE) up2=true; else up2=false;
  • if (haOpen2>haClose2 && (tlbuy2==EMPTY_VALUE && tlsell2>0)&& wsell2!=EMPTY_VALUE ) down2=true; else down2=false;



  • if (up1==true && up2 !=true)
  • {ExtMapBuffer1[shift] = Low[shift] - 35 * Point; }

  • if (down1==true && down2!=true)
  • {ExtMapBuffer2[shift] = High[shift] + 35 * Point; }
  • }
  • if (Audioalert)
  • {
  • static int audio;
  • if ((ExtMapBuffer1[1]!=0 && ExtMapBuffer1[2]==0) && audio!=1)
  • {audio=1; alert ("BUY on ",Symbol()," ",Period()," Minute Chart");}
  • if ((ExtMapBuffer2[1]!=0 && ExtMapBuffer2[2]==0) && audio!=-1)
  • {audio=-1; alert ("SELL on ",Symbol()," ",Period()," Minute Chart");}
  • }

  • if (Emailalert)
  • {
  • static int email;
  • if ((ExtMapBuffer1[1]!=0 && ExtMapBuffer1[2]==0) && email!=1)
  • {email=1; SendMail ("BUY on "+Symbol()+" "+Period()+" Minute Chart","");}
  • if ((ExtMapBuffer2[1]!=0 && ExtMapBuffer2[2]==0) && email!=-1)
  • {email=-1; SendMail ("SELL on "+Symbol()+" "+Period()+" Minute Chart","");}
  • }

  • }

复制代码
打赏