peacefulLizard50262

Weighted Harrell-Davis Quantile Estimator with AD Oscillator

xel_arjona


Licensing:

This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International Copyright (c) 2021 ( CC BY-NC-SA 4.0)


Copyright's & Mentions:

The Gamma Functions & Beta Probability Density Functions C# implementations by the Math.NET Numerics, part of the Math.NET Project.

The Regularized Incomplete (Left) Beta Function C# implementation by the SAMTools, htslib project.

The Weighted Harrell-Davis Quantile estimator; C# & R implementations by Andrey Akinshin.

External PineScript code, methods, support & consultancy by @PineCoders staff with special mention for:
+ "ma sorter ('sort by array' example)- JD" by @Duyck.
+ Porting, mods, compilation and debugging for this script by @XeL_Arjona for the TradingView's @PineCoders community.

I made it an oscillator. Features include normalization, line display, and smoothing. :DDD Enjoy!

(Ive been wanting to do this for a while but I wanted to make the library first but you know what this was fun so there you go its here now)
Release Notes:
Updated chart and added some trimming to the low band. If the low band is less than 0 its just 0 now.
tloBand = loBand < 0 ? 0 : loBand

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?