Ich verstehe nichts, MT5 Version 1545. In früheren Versionen gab es Funktionen im Math.mqh-Verzeichnis:
//+------------------------------------------------------------------+//| Computes the minimum value in array[] |//+------------------------------------------------------------------+doubleMathMin(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count==0)
return(QNaN);
if(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- first element by default, find minimumdouble min_value=array[ind1];
for(int i=ind1+1; i<=ind2; i++)
min_value=MathMin(min_value,array[i]);
//--- return minimum valuereturn(min_value);
}
//+------------------------------------------------------------------+//| Computes the maximum value in array[] |//+------------------------------------------------------------------+doubleMathMax(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count==0)
return(QNaN);
if(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- first element by default, find maximumdouble max_value=array[ind1];
for(int i=ind1+1; i<=ind2; i++)
max_value=MathMax(max_value,array[i]);
//--- return maximum valuereturn(max_value);
}
//+------------------------------------------------------------------+//| Computes the range of the values in array[] |//+------------------------------------------------------------------+double MathRange(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count==0)
return(QNaN);
if(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- default values, find minimum and maximum valuesdouble 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 rangereturn(max_value-min_value);
}
//+------------------------------------------------------------------+//| Computes the sum of the values in array[] |//+------------------------------------------------------------------+double MathSum(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count==0)
return(QNaN);
if(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- calculate sumdouble sum=0.0;
for(int i=ind1; i<=ind2; i++)
sum+=array[i];
//--- return sumreturn(sum);
}
//+------------------------------------------------------------------+//| Computes the standard deviation of the values in array[] |//+------------------------------------------------------------------+double MathStandardDeviation(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count<=1)
return(QNaN);
if(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- calculate meandouble 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 deviationreturnMathSqrt(sdev/(data_count-1));
}
//+------------------------------------------------------------------+//| Computes the average absolute deviation of the values in array[] |//+------------------------------------------------------------------+double MathAverageDeviation(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count<=1)
return(QNaN);
if(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- calculate meandouble mean=0.0;
for(int i=ind1; i<=ind2; i++)
mean+=array[i];
mean=mean/data_count;
//--- calculate average deviationdouble adev=0;
for(int i=ind1; i<=ind2; i++)
adev+=MathAbs(array[i]-mean);
adev=adev/data_count;
//--- return average deviationreturn(adev);
}
//+------------------------------------------------------------------+//| Computes the median value of the values in array[] |//+------------------------------------------------------------------+double MathMedian(double &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count==0)
return(QNaN);
if(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- prepare sorted valuesdouble sorted_values[];
ArrayCopy(sorted_values,array,0,start,count);
ArraySort(sorted_values);
//--- calculate median for odd and even cases//--- data_count=oddif(data_count%2==1)
return(sorted_values[data_count/2]);
else//--- data_count=evenreturn(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(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count<1)
return(QNaN); // need at least 1 observationif(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- calculate meandouble mean=0.0;
for(int i=ind1; i<=ind2; i++)
mean+=array[i];
mean=mean/data_count;
//--- return meanreturn(mean);
}
//+------------------------------------------------------------------+//| Computes the variance of the values in array[] |//+------------------------------------------------------------------+double MathVariance(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count<2)
return(QNaN); // need at least 2 observationsif(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- calculate meandouble mean=0.0;
for(int i=ind1; i<=ind2; i++)
mean+=array[i];
mean=mean/data_count;
//--- calculate variancedouble variance=0;
for(int i=ind1; i<=ind2; i++)
variance+=MathPow(array[i]-mean,2);
variance=variance/(data_count-1);
//--- return variancereturn(variance);
}
//+------------------------------------------------------------------+//| Computes the skewness of the values in array[] |//+------------------------------------------------------------------+double MathSkewness(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count<3)
return(QNaN); // need at least 3 observationsif(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- calculate meandouble mean=0.0;
for(int i=ind1; i<=ind2; i++)
mean+=array[i];
mean=mean/data_count;
//--- calculate variance and skewnessdouble 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 skewnessreturn(skewness);
}
elsereturn(QNaN);
}
//+------------------------------------------------------------------+//| Computes the kurtosis of the values in array[] |//+------------------------------------------------------------------+double MathKurtosis(constdouble &array[],constint start=0,constint count=WHOLE_ARRAY)
{
int size=ArraySize(array);
int data_count=0;
//--- set data countif(count==WHOLE_ARRAY)
data_count=size;
else
data_count=count;
//--- check data rangeif(data_count<4)
return(QNaN); // need at least 4 observationsif(start+data_count>size)
return(QNaN);
//--- set indexesint ind1=start;
int ind2=ind1+data_count-1;
//--- calculate meandouble mean=0.0;
for(int i=ind1; i<=ind2; i++)
mean+=array[i];
mean=mean/data_count;
//--- calculate variance and kurtosisdouble 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 kurtosisreturn(kurtosis);
}
elsereturn(QNaN);
}
Ich habe in anderen Mathe-Verzeichnissen nachgesehen, aber auch dort habe ich diese Funktionen nicht gefunden.
Wurden sie überhaupt entfernt oder wurden sie versehentlich gelöscht?
Alexey Viktorov: Wozu braucht man sie, wenn man alle mathematischen Funktionen zur Verfügung hat?
Bevor Sie antworten, vergleichen Sie sie mit denen, die ich in der Liste aufgeführt habe. Übrigens sind diese Funktionen in der Hilfe der Standardbibliothek aufgeführt, so dass es wahrscheinlicher ist, dass jemand sie versehentlich gelöscht hat.
Bevor Sie antworten, vergleichen Sie sie mit denen, die ich in der Liste aufgeführt habe. Übrigens sind diese Funktionen in der Hilfe der Standardbibliothek aufgeführt, so dass es wahrscheinlicher ist, dass jemand sie versehentlich gelöscht hat.
Die Antwort von servicedesk, Datenfunktionen aus der Standardbibliothek wurden absichtlich entfernt, das Problem ist behoben. Auch die Hilfe sollte in Einklang gebracht werden, denn manchmal wird Zeit mit der Suche nach etwas verschwendet, das nicht mehr in der Funktionalität enthalten ist.
Wie kann das sein? Ich eröffne ein Demokonto auf einem Server der Firma btc-e.com, aber es öffnet sich auf einem ganz anderen Server einer anderen Firma!
Wenn Sie kein Benutzerkonto haben, registrieren Sie sich
Erlauben Sie die Verwendung von Cookies, um sich auf der Website MQL5.com anzumelden.
Bitte aktivieren Sie die notwendige Einstellung in Ihrem Browser, da Sie sich sonst nicht einloggen können.
Sie sind angemeldet. Die Zwei-Faktor-Authentifizierung wurde deaktiviert. Richten Sie sie erneut ein und scannen Sie einen neuen QR-Code oder fahren Sie mit deaktivierter Zwei-Faktor-Authentifizierung fort.
Vielleicht ist das schon geschehen, aber ich möchte fragen:
Warum istPOSITION_COMMISSION nicht hervorgehoben und steht nicht in der Hilfe?
Diese Konstante ist nicht mehr relevant, aber leider können wir sie nicht verwerfen. Deshalb ist sie im Compiler nicht beleuchtet.
Ich sehe darin keinen Widerspruch.
Im Widerspruch zu was?
Ich habe einen negativen Saldo im Prüfgerät angezeigt. Außerdem ging das Eigenkapital unter Null. Ich muss annehmen, dass es ein Fehler ist.
Ich verstehe nichts, MT5 Version 1545. In früheren Versionen gab es Funktionen im Math.mqh-Verzeichnis:
Ich habe in anderen Mathe-Verzeichnissen nachgesehen, aber auch dort habe ich diese Funktionen nicht gefunden.
Wurden sie überhaupt entfernt oder wurden sie versehentlich gelöscht?
Überprüft bis zur Version 1554 von MT5, gleiche Geschichte, diese Funktionen sind nicht mehr da
Wozu braucht man sie, wenn man alle mathematischen Funktionen zur Verfügung hat?
Bevor Sie antworten, vergleichen Sie sie mit denen, die ich in der Liste aufgeführt habe. Übrigens sind diese Funktionen in der Hilfe der Standardbibliothek aufgeführt, so dass es wahrscheinlicher ist, dass jemand sie versehentlich gelöscht hat.
Bevor Sie antworten, vergleichen Sie sie mit denen, die ich in der Liste aufgeführt habe. Übrigens sind diese Funktionen in der Hilfe der Standardbibliothek aufgeführt, so dass es wahrscheinlicher ist, dass jemand sie versehentlich gelöscht hat.
Die Antwort von servicedesk, Datenfunktionen aus der Standardbibliothek wurden absichtlich entfernt, das Problem ist behoben. Auch die Hilfe sollte in Einklang gebracht werden, denn manchmal wird Zeit mit der Suche nach etwas verschwendet, das nicht mehr in der Funktionalität enthalten ist.
Wie kann das sein? Ich eröffne ein Demokonto auf einem Server der Firma btc-e.com, aber es öffnet sich auf einem ganz anderen Server einer anderen Firma!
