Median Absolute Deviation Filtered SMA & BBMedian Absolute Deviation (MAD) is a robust measurement of variability and more resilient against outliers and small samples.
This experiment uses MAD as a means of filtering outliers from an SMA calculation. First we construct the equivalent of a Bollinger Band, but based on the median as the basis and a multiple( k ) of MAD as the outlier cutoff.
k can be set a number of ways. As a simple multiple (3 - very conservative / 2.5 - moderately conservative / 2 - poorly conservative). Alternatively MAD can be used as an estimator of standard deviation by using a multiple of 1.4826 (SD1 - 1.4826 / SD2 - 2.9652 / SD3 - 4.4478).
Once we have a cutoff range an SMA is calculated with the outliers filtered out. Additionally a Bollinger band can be output using the filtered SMA as the basis and a multiple of the MAD instead of SD for the bands.
Filteredoutput
Time Series Lag Reduction Filter by CryptorhythmsTime Series Lag Reduction Filter by Cryptorhythms
Description
A little filter to reduce lag on any time series data. Here we use an EMA to demonstrate how it works, but you could use it in many different ways/appications.
This method can cause overshoot if you get too aggressive with the "lagReduce" setting. In this case lower the lagReduce variable.
👍 We hope you enjoyed this indicator and find it useful! We post free crypto analysis, strategies and indicators regularly. This is our 76th script on Tradingview!