byteboi

Relative Derivative by byteboi

A great way to measure the power of buyers and sellers is to look at the rate of change of the price. If the price raises very fast, buyers have the upper hand in the market. If the price drops very fast, sellers are stronger. However, things get interesting when prices start to change at a slower rate. When the rate at which price falls goes to zero, sellers are weak and there tends to be a major uptrend coming. When the rate at which prices move up goes to zero, usually prices fall off a cliff.

This decline in rate of change can sometimes be quite hidden and hard to spot. To get a better view on these events, I wrote a simple script that takes the rate of change (derivative) of the price.

But taking the derivative alone has a flaw: say, for example, the price of an asset raises form $2 to $4 within 1 bar. This will give us a big rate of change. If we now look at an asset whose price surges from $50 to $100, the rate of change would be even bigger. This is not useful when you're comparing the two assets, because both events would give you a growth of 100% but it's rate of change values differ.

To compensate for this, I divided the rate of change by the current price. Also I added an SMA so it's possible to smooth out the signal so spotting patterns will be easier.

Patterns to look for:
- the RD converges to zero from the upside: buyers get weaker -> price drop
- the RD converges to zero from the downside: sellers get weaker -> price rise
- all patterns that you would normally look for on the RSI: divergence, support/resistance

Always be sure to use this in combination with other indicators so you won't fall for false or vague signals.

Thanks for reading and good luck trading everyone!
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?