The Recursive Median Filter is a non-linear data processing technique. When applied to waveform-like input data, it ignores value spikes without averaging them. Being a recursive method, the filter references its own previous values in the calculation; a similar mechanism is used in the Exponential Moving Average study. The main purpose of the filter is to pass data with wavelengths shorter than a critical period and to eliminate data with longer wavelengths. You can specify a custom critical period in the input parameters; by default, it is set to 12 bars.

Essentialy, the Recursive Median Filter is the exponential moving average of the median close price. The smoothing factor is calculated based on a trigonometrical formula that uses the critical period of the filter as the argument. 

Input Parameters



lp length

The critical period of the filter. Data with wavelengths shorter than this will be passed, longer wavelengths will be eliminated.





The data output by the Recursive Median Filter.

Further Reading

1. Technical Analysis of Stocks and Commodities, March 2018.


*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.

You may also like
The Momentum Percent Diff is a momentum-based technical indicator. Unlike the regular Momentum ...
Tick Counter
Tick Counter is a feature available for charts using Tick aggregation. This feature shows ...
The Slow Relative Strength Index is a version of the classic Relative Strength Index (RSI), ...