Moving Median

The moving median is a central tendency which is calculated over a sliding window of price bars or indicator values. The median is the numeric value separating the higher from the lower half of the data set built from the input series over the selected window.

Indicator Description

The moving median is a non-linear FIR (finite impulse response) filter that can be used like a moving average. Compared to all standard moving averages, it is a more robust central tendency, because it is less sensitive to outliers.

The moving median over a lookback period N is calculated by writing the last N values of the input series to an array, sorting the array and selecting the middle value of that array.

The indicator is available for NinjaTrader 8.