+ Rate of Change (and OBV)

The Rate of Change , or RoC , is a momentum indicator that measures the percentage change in price between the current period and the price n periods ago. It oscillates above and below a zeroline, basically showing positive or negative momentum. I applied the OBV's calculation to it, but without the inclusion of volume (also added a lookback period) to see what would happen.

Actually what happened was I was looking at hot-rodding the OBV indicator, but then wondered if I could apply the cumulative calculation to another indicator to see what would happen. Not sure why I chose the Rate of Change , but it seemed a neat idea. And it worked! And so I called it the "Cumulative Rate of Change ." I only recently realized that this is actually just the OBV without volume , HOWEVER the OBV does not have a lookback period, and its source is the close of each period. Basically, when you look at the calculation for the OBV you'll notice that it's a cumulative measure of the "change" of the closing price against the previous close times the volume . The Rate of Change is basically that measurement over more than one period, excluding the volume , and is not cumulative. Thus the "Cumulative Rate of Change" is basically an OBV without the volume but with the capability to adjust the lookback period.

Anyway, after days and weeks of playing with the indicator pretty infrequently I did decide that I actually really liked it, especially with the addition of moving averages and bollinger bands . So I decided to play with it a bit more.

I added a drop-down menu to include the standard Rate of Change indicator, and then thought I may as well add the OBV too, in case someone might like to compare that to the C-RoC, or just wants an OBV with myriad moving averages and bollinger bands .

By default I have the indicator set to the "C-RoC" and the lookback is set to 1, but play with longer settings (this is pretty much necessary if using the traditional RoC , which is by default set to 10 in TradingView, and is nigh on useless at 1).

I also recommend playing with the source. 'Close' is nice, but 'ohlc4' provides some very nice signals as well, as it follows the price flow for each period completely, filtering the noisiness of 'close' as source.

Hope you guys like this. With the bollinger bands and your preferred moving average settings this can be a powerful tool for re-entering trades in trend, taking profits, determining momentum swings.
Notas de prensa: fixed an issue in the JMA calculation where it was only calculating off the C-ROC and no other indicators
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?