오류, 버그, 질문 - 페이지 59

[삭제]  
Renat :

다행히도 이전 구성의 문제는 남아 있습니다. 50번의 빌드 전은 매우 오랜 시간이었고 우리는 여러 번 형식을 변경할 수 있었습니다.

중개인을 위해 우리 는 분산 배포 전달 네트워크 뿐만 아니라 files.metaquotes.net에 모든 배포의 중앙 집중식 저장소를 제공했습니다. 이것은 근본적으로 서로 다른 회사의 배포 사본 수백 개를 적시에 업데이트하는 문제를 해결합니다.

어쨌든 이 문제에 대해 사과드립니다. 다시는 이런 일이 발생하지 않을 것이라고 확신합니다.

또한 알려진 액세스 포인트에 대한 연결이 실패할 경우 브로커의 거래 서버를 자동으로 안전하게 검색하는 훨씬 더 발전된 방법을 적용할 것입니다. 이것은 작업 액세스 포인트 목록의 게시 문제를 근본적으로 해결할 것입니다.

Alpari가 해결해 주셔서 감사합니다. 이제 릴리스 291이 사이트에서 사용 가능한 것 같습니다. Admiral 시장 은 사이트에 이전 버전을 유지할 가치가 없다고 설명해야 합니다. 일반적으로 무게가 7MB인 237 릴리스가 있습니다. ... :)
 
EQU :

얘들 아, 커서는 어떻습니까 .. 확실히 - F7에서 충돌합니다 ..

호산나 대신 말만..

및 단축키 - pliz - return .. 쉽습니다 .. 습관 - 몇 년 동안 그려졌습니다 ..


단축키는 허용됩니다. 과제가 있습니다.

커서는 조금 더 어렵습니다. 지금까지 귀하가 표시한 조치에서도 관찰되지 않았습니다.

 

그런 상황에서 표시기를 작성하고 실행하면 터미널이 충돌합니다. 이 오류를 씁니다.

2010.07.22 13:43:55 StandardDeviationChannel (EURUSD,M1) 'StandardDeviationChannel.mq5'의 범위를 벗어난 배열(114,51)

어디에서 실수하고 있는지 알 수 없습니다. 논리적으로 모든 것을 올바르게 등록한 것 같습니다. ...\MQL5\Indicators\의 표준 사용자 지정 표시기 세트의 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) 'StandardDeviationChannel.mq5'의 범위를 벗어난 배열( 114,51 )

첨부된 코드 라인 114 및 51의 위치를 표시하십시오.
 
ExtUpBuffer[i]=ExtMABuffer[i]+(InpDeviation* E xtStdDevBuffer[i]);
빨간색으로 강조 표시
 
sergey1294 :
빨간색으로 강조 표시

분명히 귀하의 to_copy는 Rates_total보다 적습니다.
 
mql5 :
분명히 귀하의 to_copy는 Rates_total보다 적습니다.

예, to_copy=1입니다.
 
Rosh :
예, to_copy=1입니다.

그리고 이것은 어떻게 고칠 수 있습니까? 1과 같으면 왜 이 줄을 제거합니까?

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

그런 다음 표시기가 작동하기 시작하고 MA를 완벽하게 그립니다.

 
sergey1294 :

그리고 이것은 어떻게 고칠 수 있습니까? 1과 같으면 왜 이 줄을 제거합니까?

그런 다음 표시기가 작동하기 시작하고 MA를 완벽하게 그립니다.


지정한

#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

하지만 참다

대단히 감사합니다. 그런 사소한 일을 눈치 채지 못했습니다. 이제 모든 것이 정상입니다.