peacefulLizard50262

Outlier Detecting Cumulative Moving Average (ODCMA)

This is a simple moving average with a rolling length that resets whenever there is an outlier in the data. I have also included volume weighting.

The length represents the lookback period for the outlier detection and the "Outlier Detection" is the deviation level to trigger the detection. You can select from: price detection, volume detection, price or volume detection, price and volume detection.

I hope you can find this script useful. Its like a session weighted moving average but instead it retriggers the cumulative sum whenever there is an outlier.

Release Notes:

I added true range outlier detection as option
Release Notes:
Fix to volume score
Release Notes:
added pivot points and smoothing

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?