ClassicScott

+ Rate of Change (and OBV)

ClassicScott 已更新   
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.
版本注释:
fixed an issue in the JMA calculation where it was only calculating off the C-ROC and no other indicators

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?