Definition
Returns the median value of the specified series over the specified look back period. This method will sort the values of the specified look back period in ascending order and return the middle value. If an even number is passed in, the average of the two middle values in the sorted values will be returned.
Method Return Value
A double value representing the median price.
Syntax
GetMedian(IDataSeries series, int lookBackPeriod)
Method Of
Custom Indicator, Custom Strategy
|
Parameters |
|
|
series |
Any DataSeries type object such as an indicator, Close, High, Low etc.. |
|
lookBackPeriod |
Number of bars back to include in the calculation |
Examples
|
// Print the median price of the last 10 open prices
|