Note that publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section, please use the Copyright Infringement Notification form to submit a claim.
Insepired by KivancOzbilgic from TradingView.
I'm not 100% sure the algorithm is the same as the original version of KivancOzbilgic. So feel free to suggest improvements to the code.