Finds the median value of the series.

 

The median is the middle value of the series if the series has an odd number of elements.

 

If there are an even number of elements, the median is the average of the middle two values.

 

This example shows the use of the common auto indexed series.

 

For information on using functions with non auto indexed series review Series Functions.

 

Syntax:

Median( series, [bars], [offset] )

 

Parameter:

Description:

series

The name of the series.

[bars]

The number of bars over which to find the value. Default is the whole series.

[offset]

The number of bars to offset the starting index. Default is zero.

 

Example:

' Find the median value of the last 100 bars of the series.
 
medianValue = Median( instrument.close, 100 )

Returns:

The median value of series calculated at the current record location.

 

Links:

Average

See Also:

Series Functions

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 417

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software