rumpypumpydumpy

Median Absolute Deviation Filtered SMA & BB

Median 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.



オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?