Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/1151-standardlibrary-mathematics-stat-array-stat-mathmedian.md
T
2026-06-23 21:47:51 +08:00

593 B

MathMedian

Calculates the median value of array elements. Analog of the median() in R.

double  MathMedian(
   const double&  array[]                // array with data
   );

Parameters

array

[in]  Array with data for calculation.

start=0

[in]  Initial index for calculation.

count=WHOLE_ARRAY

[in]  The number of elements for calculation.

Return Value

The median value of array elements. In case of error it returns NaN (not a number).