错误、漏洞、问题 - 页 59

 
Renat:

幸运的是,旧配置的问题已经过去了。50年前是一个非常长的时间,我们已经允许自己多次改变格式。

对于经纪人来说,我们不仅提供了 一个分布式的发行交付网络,而且还在files.metaquotes.net提供了一个集中的所有发行库--这从根本上解决了为不同公司及时更新数百份发行的问题。

无论如何,我对这种不愉快的事情表示歉意--我相信它不会再发生。

此外,我们现在将应用一种更先进的方法,在与已知接入点连接失败时,自动安全地定位经纪人交易服务器。这将从根本上解决公布工作接入点名单的问题。

谢天谢地,Alpari已经解决了,我想现在在那里的网站上可以看到291号的发布。Admiral市场 需要解释的是,没有必要在网站上保留旧版本--有一个重达7mb的237版本...。:)
 
EQU:

伙计们,这光标是怎么回事...这绝对是F7,它跳出来了...

而不是颂歌--只是文字......

和热键--请--带回来......这并不难......这是一种习惯--它已经被画了很多年......


至于热键--接受。任务就在那里。

光标的情况就比较复杂了。即使通过你提到的行动,仍然没有观察到。

 

写了 这样一个情况,我试图运行,终端崩溃了。

2010.07.22 13:43:55 StandardDeviationChannel (EURUSD,M1) Array out of range in 'StandardDeviationChannel.mq5' (114,51)

我从...\MQL5\Indicators\Examples文件夹中的标准自定义指标集的MACD指标中取了一个例子。

//+------------------------------------------------------------------+
//|                                     StandardDeviationChannel.mq5 |
//|                                                    Сергей Грицай |
//|                                               sergey1294@list.ru |
//+------------------------------------------------------------------+
#property copyright "Сергей Грицай"
#property link      "sergey1294@list.ru"
#property version   "1.00"
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_plots   3
#property indicator_type1   DRAW_LINE
#property indicator_type2   DRAW_LINE
#property indicator_type3   DRAW_LINE
#property indicator_color1  DodgerBlue
#property indicator_color2  DodgerBlue
#property indicator_color3  Blue
#property indicator_style3  STYLE_DOT

input int                InpMAPeriod=14;              // Period
input int                InpMAShift=0;                // Shift
input ENUM_MA_METHOD     InpMAMethod=MODE_SMA;        // Method
input ENUM_APPLIED_PRICE InpAppliedPrice=PRICE_CLOSE; // Applied price
input int                InpDeviation=2.0;            // Deviation
//--- indicator buffers
double                   ExtUpBuffer[];
double                   ExtDownBuffer[];
double                   ExtMiddBuffer[];
double                   ExtMABuffer[];
double                   ExtStdDevBuffer[];
//--- indicator handle
int                      ExtMAHandle;
int                      ExtStdDevMAHandle;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   SetIndexBuffer(0,ExtUpBuffer,INDICATOR_DATA);
   SetIndexBuffer(1,ExtDownBuffer,INDICATOR_DATA);
   SetIndexBuffer(2,ExtMiddBuffer,INDICATOR_DATA);
   SetIndexBuffer(3,ExtMABuffer,INDICATOR_CALCULATIONS);
   SetIndexBuffer(4,ExtStdDevBuffer,INDICATOR_CALCULATIONS);
   
   PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,InpMAPeriod-1);
   PlotIndexSetInteger(1,PLOT_DRAW_BEGIN,InpMAPeriod-1);
   PlotIndexSetInteger(2,PLOT_DRAW_BEGIN,InpMAPeriod-1);


   ExtMAHandle=iMA(NULL,0,InpMAPeriod,0,InpMAMethod,InpAppliedPrice);
   ExtStdDevMAHandle=iStdDev(NULL,0,InpMAPeriod,0,InpMAMethod,InpAppliedPrice);
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
//--- return value of prev_calculated for next call
   if(rates_total<InpMAPeriod)
      return(0);
//--- not all data may be calculated
   int calculated=BarsCalculated(ExtMAHandle);
   if(calculated<rates_total)
     {
      Print("Not all data of ExtMAHandle is calculated (",calculated,"bars ). Error",GetLastError());
      return(0);
     }
   calculated=BarsCalculated(ExtStdDevMAHandle);
   if(calculated<rates_total)
     {
      Print("Not all data of ExtStdDevMAHandle is calculated (",calculated,"bars ). Error",GetLastError());
      return(0);
     }
//--- we can copy not all data
   int to_copy;
   if(prev_calculated>rates_total || prev_calculated<0) to_copy=rates_total;
   else
     {
      to_copy=rates_total-prev_calculated;
      if(prev_calculated>0) to_copy++;
     }
//--- get MA buffer
   if(CopyBuffer(ExtMAHandle,0,0,to_copy,ExtMABuffer)<=0)
     {
      Print("Getting fast MA is failed! Error",GetLastError());
      return(0);
     }
//--- get StdDev buffer
   if(CopyBuffer(ExtStdDevMAHandle,0,0,to_copy,ExtStdDevBuffer)<=0)
     {
      Print("Getting slow StdDev is failed! Error",GetLastError());
      return(0);
     }
//---
   int limit;
   if(prev_calculated==0)
      limit=0;
   else limit=prev_calculated-1;
//--- the main loop of calculations
   for(int i=limit;i<rates_total;i++)
     {
      ExtMiddBuffer[i]=ExtMABuffer[i];
      ExtUpBuffer[i]=ExtMABuffer[i]+(InpDeviation*ExtStdDevBuffer[i]);
      ExtDownBuffer[i]=ExtMABuffer[i]-(InpDeviation*ExtStdDevBuffer[i]);
     }
   return(rates_total);
  }
//+------------------------------------------------------------------+
 
sergey1294:

我写了这样一个情况,我试图运行它,终端崩溃了。

2010.07.22 13:43:55 StandardDeviationChannel (EURUSD,M1) Array out of range in 'StandardDeviationChannel.mq5'(114,51)

请指出114行和51行的位置在所附代码中的位置。
 
ExtUpBuffer[i]=ExtMABuffer[i]+(InpDeviation*E xtStdDevBuffer[i]);
突出显示为红色
 
sergey1294:
突出显示为红色。

显然,你的to_copy明显小于rate_total。
 
mql5:
显然,你的to_copy明显小于rate_total。

是的,to_copy=1。
 
Rosh:
是的,to_copy=1。

如果它是一个,为什么当你删除这些线时

      ExtUpBuffer[i]=ExtMABuffer[i]+(InpDeviation*ExtStdDevBuffer[i]);
      ExtDownBuffer[i]=ExtMABuffer[i]-(InpDeviation*ExtStdDevBuffer[i]);

指示器开始工作并显示МА

 
sergey1294:

如果它是一个,为什么当你删除这些线时

指示器开始工作并显示МА


你已经指定

#property indicator_buffers 4

而你把它设置为

   SetIndexBuffer(0,ExtUpBuffer,INDICATOR_DATA);
   SetIndexBuffer(1,ExtDownBuffer,INDICATOR_DATA);
   SetIndexBuffer(2,ExtMiddBuffer,INDICATOR_DATA);
   SetIndexBuffer(3,ExtMABuffer,INDICATOR_CALCULATIONS);
   SetIndexBuffer(4,ExtStdDevBuffer,INDICATOR_CALCULATIONS);
 
mql5:
你指出了

#property indicator_buffers 4

但你做到了。

非常感谢你,我没有注意到这么小的事情,现在好了。