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

 
 
Andrey Dik :
나는 모순이 보이지 않는다.
 
transcendreamer :

이미 발생했을 수도 있지만 어쨌든 묻겠습니다.

POSITION_COMMISSION 이 강조 표시되지 않고 도움말에 없는 이유는 무엇입니까?


이 상수는 더 이상 관련이 없지만 불행히도 거부할 수 없습니다. 따라서 강조 표시하지 않고 컴파일러에 남겨 둡니다.

 
fxsaber :
나는 모순이 보이지 않는다.

무엇과 충돌?

테스터에서 마이너스 밸런스를 보였습니다. 게다가 자기자본은 0 이하로 떨어졌다. 이것은 버그라고 가정해야 합니다.

 

나는 아무것도 이해하지 못합니다. MT5 버전은 1545입니다. 이전 버전에서 Math.mqh 목록에는 다음 기능이 포함되었습니다.

 //+------------------------------------------------------------------+
//| Computes the minimum value in array[]                            |
//+------------------------------------------------------------------+
double MathMin ( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count== 0 )
       return (QNaN);
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- first element by default, find minimum
   double min_value=array[ind1];

   for ( int i=ind1+ 1 ; i<=ind2; i++)
      min_value= MathMin (min_value,array[i]);
//--- return minimum value
   return (min_value);
  }
//+------------------------------------------------------------------+
//| Computes the maximum value in array[]                            |
//+------------------------------------------------------------------+
double MathMax ( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count== 0 )
       return (QNaN);
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- first element by default, find maximum
   double max_value=array[ind1];

   for ( int i=ind1+ 1 ; i<=ind2; i++)
      max_value= MathMax (max_value,array[i]);
//--- return maximum value
   return (max_value);
  }
//+------------------------------------------------------------------+
//| Computes the range of the values in array[]                      |
//+------------------------------------------------------------------+
double MathRange( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count== 0 )
       return (QNaN);
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- default values, find minimum and maximum values
   double min_value=array[ind1];
   double max_value=array[ind1];

   for ( int i=ind1+ 1 ; i<=ind2; i++)
     {
       double value=array[i];
      min_value= MathMin (min_value,value);
      max_value= MathMax (max_value,value);
     }
//--- return range
   return (max_value-min_value);
  }
//+------------------------------------------------------------------+
//| Computes the sum of the values in array[]                        |
//+------------------------------------------------------------------+
double MathSum( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count== 0 )
       return (QNaN);
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- calculate sum
   double sum= 0.0 ;
   for ( int i=ind1; i<=ind2; i++)
      sum+=array[i];
//--- return sum
   return (sum);
  }
//+------------------------------------------------------------------+
//| Computes the standard deviation of the values in array[]         |
//+------------------------------------------------------------------+
double MathStandardDeviation( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count<= 1 )
       return (QNaN);
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- calculate mean
   double mean= 0.0 ;
   for ( int i=ind1; i<=ind2; i++)
      mean+=array[i];
//--- average mean
   mean=mean/data_count;
//--- calculate standard deviation   
   double sdev= 0 ;
   for ( int i=ind1; i<=ind2; i++)
      sdev+= MathPow (array[i]-mean, 2 );
//--- return standard deviation
   return MathSqrt (sdev/(data_count- 1 ));
  }
//+------------------------------------------------------------------+
//| Computes the average absolute deviation of the values in array[] |
//+------------------------------------------------------------------+
double MathAverageDeviation( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count<= 1 )
       return (QNaN);
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- calculate mean
   double mean= 0.0 ;
   for ( int i=ind1; i<=ind2; i++)
      mean+=array[i];
   mean=mean/data_count;
//--- calculate average deviation
   double adev= 0 ;
   for ( int i=ind1; i<=ind2; i++)
      adev+= MathAbs (array[i]-mean);
   adev=adev/data_count;
//--- return average deviation
   return (adev);
  }
//+------------------------------------------------------------------+
//| Computes the median value of the values in array[]               |
//+------------------------------------------------------------------+
double MathMedian( double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count== 0 )
       return (QNaN);
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- prepare sorted values
   double sorted_values[];
   ArrayCopy (sorted_values,array, 0 ,start,count);
   ArraySort (sorted_values);
//--- calculate median for odd and even cases
//--- data_count=odd
   if (data_count% 2 == 1 )
       return (sorted_values[data_count/ 2 ]);
   else
//--- data_count=even
       return ( 0.5 *(sorted_values[(data_count- 1 )/ 2 ]+sorted_values[(data_count+ 1 )/ 2 ]));
  }
//+------------------------------------------------------------------+
//| Computes the mean value of the values in array[]                 |
//+------------------------------------------------------------------+
double MathMean( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count< 1 )
       return (QNaN); // need at least 1 observation
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- calculate mean
   double mean= 0.0 ;
   for ( int i=ind1; i<=ind2; i++)
      mean+=array[i];
   mean=mean/data_count;
//--- return mean
   return (mean);
  }
//+------------------------------------------------------------------+
//| Computes the variance of the values in array[]                   |
//+------------------------------------------------------------------+
double MathVariance( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count< 2 )
       return (QNaN); // need at least 2 observations
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- calculate mean
   double mean= 0.0 ;
   for ( int i=ind1; i<=ind2; i++)
      mean+=array[i];
   mean=mean/data_count;
//--- calculate variance
   double variance= 0 ;
   for ( int i=ind1; i<=ind2; i++)
      variance+= MathPow (array[i]-mean, 2 );
   variance=variance/(data_count- 1 );
//--- return variance
   return (variance);
  }
//+------------------------------------------------------------------+
//| Computes the skewness of the values in array[]                   |
//+------------------------------------------------------------------+
double MathSkewness( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count< 3 )
       return (QNaN); // need at least 3 observations
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- calculate mean
   double mean= 0.0 ;
   for ( int i=ind1; i<=ind2; i++)
      mean+=array[i];
   mean=mean/data_count;
//--- calculate variance and skewness
   double variance= 0 ;
   double skewness= 0 ;
   for ( int i=ind1; i<=ind2; i++)
     {
       double sqr_dev= MathPow (array[i]-mean, 2 );
      skewness+=sqr_dev*(array[i]-mean);
      variance+=sqr_dev;
     }
   variance=(variance)/(data_count- 1 );
   double v3= MathPow ( MathSqrt (variance), 3 );
//---
   if (v3!= 0 )
     {
      skewness=skewness/(data_count*v3);
       //--- return skewness
       return (skewness);
     }
   else
       return (QNaN);
  }
//+------------------------------------------------------------------+
//| Computes the kurtosis of the values in array[]                   |
//+------------------------------------------------------------------+
double MathKurtosis( const double &array[], const int start= 0 , const int count= WHOLE_ARRAY )
  {
   int size= ArraySize (array);
   int data_count= 0 ;
//--- set data count
   if (count== WHOLE_ARRAY )
      data_count=size;
   else
      data_count=count;
//--- check data range
   if (data_count< 4 )
       return (QNaN); // need at least 4 observations
   if (start+data_count>size)
       return (QNaN);
//--- set indexes
   int ind1=start;
   int ind2=ind1+data_count- 1 ;
//--- calculate mean
   double mean= 0.0 ;
   for ( int i=ind1; i<=ind2; i++)
      mean+=array[i];
   mean=mean/data_count;
//--- calculate variance and kurtosis
   double variance= 0 ;
   double kurtosis= 0 ;
   for ( int i=ind1; i<=ind2; i++)
     {
       double sqr_dev= MathPow (array[i]-mean, 2 );
      variance+=sqr_dev;
      kurtosis+=sqr_dev*sqr_dev;
     }
//--- calculate variance
   variance=(variance)/(data_count- 1 );
   double v4= MathPow ( MathSqrt (variance), 4 );

   if (v4!= 0 )
     {
       //--- calculate kurtosis
      kurtosis=kurtosis/(data_count*v4);
      kurtosis-= 3 ;
       //--- return kurtosis
       return (kurtosis);
     }
   else
       return (QNaN);
  }

지금은 이 목록에 없습니다. Math 카탈로그의 다른 목록을 살펴보았지만 여기에서도 이러한 기능을 찾지 못했습니다.

그들은 전혀 제거되었거나 실수로 지워졌습니까?

 
버전 1554 MT5까지 확인, 같은 이야기, 이러한 기능은 더 이상 사용할 수 없습니다.
 
luser.2017 :
버전 1554 MT5까지 확인, 같은 이야기, 이러한 기능은 더 이상 사용할 수 없습니다.
그리고 수학적 기능의 전체 세트가 있다면 왜 거기에 필요합니까?
Документация по MQL5: Математические функции
Документация по MQL5: Математические функции
  • www.mql5.com
Математические функции - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Alexey Viktorov :
그리고 수학적 기능의 전체 세트가 있다면 왜 거기에 필요합니까?


대답하기 전에 내가 목록에 게시한 것과 비교하십시오. 그건 그렇고, 이러한 기능은 표준 라이브러리 도움말에 나열되어 있으므로 누군가 실수로 잘못 배치한 것처럼 보입니다.

 
Konstantin :


대답하기 전에 내가 목록에 게시한 것과 비교하십시오. 그건 그렇고, 이러한 기능은 표준 라이브러리 도움말에 나열되어 있으므로 누군가 실수로 잘못 배치한 것처럼 보입니다.


서비스 데스크에서 답변을 받았고 이러한 기능은 라이브러리의 표준 제공에서 의도적으로 제거되었으며 질문은 제거되었습니다. 도움을 줄 필요도 있습니다. 그렇지 않으면 더 이상 작동하지 않는 것을 찾는 데 시간을 낭비하는 경우가 있습니다.
 

어떻게 이럴 수있어? btc-e.com 회사의 한 서버에서 데모 계정을 열었는데 다른 회사의 완전히 다른 서버에서 열립니다!




사유: