GetMedian()
<< Click to Display Table of Contents >> GetMedian() |
Returns the statistical median value of the specified series over the specified look-back period. This method sorts the values of the specified look back period in ascending order and return the middle value.
Notes: 1. This method should NOT be confused with Median prices defined as (High + Low) / 2. This method returns the statistical median of a series. 2. If an even number is passed as the look-back period, the average of the two middle values in the sorted values will be returned. |
A double value representing the median value of the series.
lookBackPeriod |
Number of bars back to include in the calculation |
series |
Any Series<double> type object such as an indicator, Close, High, Low, etc... |
protected override void OnBarUpdate() |