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.



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





The name of the series.


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


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



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


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




See Also:

Series Functions


Edit Time: 5/10/2017 9:30:26 AM

Topic ID#: 417


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