Rate Of Change [Hyperbolic]

akikostas Updated   
Rate Of Change just got fixed!

Do note that you have to activate the "exotic calculations" inside the ROC-H settings.

A hyperbolic curve now transforms price. No more infinities on your indicators!

You may use the "exotic" function, that is embedded in my script in your own scripts.
This formula basically transforms the input (which may be zero or negative) into a strictly positive one.

While the mathematicians out there would opt for alternative formulae (like the exponential for negative numbers), I used the hyperbolic curve for continuity purposes. Feel free to build upon my calculations, and make them even better!

Tread lightly, for this is hallowed ground.
-Father Grigori

P.S. I cannot lock the source code. Science and knowledge belongs to humanity. Knowledge must not be up for sale.
Release Notes:
Now it is easier to copy and paste the hyperbolic() formula, and use it in you indicators.
You can now call this formula as many times as you wish, and transform your inputs (high, low, close etc).
Appropriate comments are placed inside the code, to make it more explanatory.
Release Notes:
Ridiculously simplified Hyperbolic Curve.
Release Notes:
Log-based ROC
Release Notes:
Change of title! Now ROC-H is ROC-L.
Release Notes:
Added copyright.
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.


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?

Related Ideas