ClassicScott

+ Breadth & Volume

note* If you've used my "+ Rate of Change Indicator", I am updating that without the OBV, which has been moved here. Just an FYI.

This "indicator" is basically a variety of indicators that measure volume , or accumulation/distribution . There's a bit of a story about how this came about but
it's not that interesting, so I'll spare you.

Indicators from which you may choose here are On Balance Volume (OBV), Money Flow Index ( MFI ), Chaikin Money Flow ( CMF ), Chaikin Oscillator , and Positive & Negative Net Volume .

I'll give a brief overview of these below, and if you want to educate yourself further on them you may. There are many web resources for that.

Most people are probably familiar with OBV. It's one of the more commonly used volume indicators, especially in the crypto crowd (at least amongst those traders I follow). It's basically a cumulative (doesn't oscillate around a midpoint) momentum indicator that measures volume of the current period versus volume of the previous period and adds it if price closed higher, but subtracts it if price closes lower. It's another way of using volume to confirm trend.

The MFI is a momentum indicator that measures the flow of money into and out of an asset over some period of time (user input). It's calculated using the RSI , so it can be used similarly to RSI (divergences, overbought, oversold, etc.), but of course unlike the RSI it's calculated primarily using volume and comparing the most recent candle close to the previous one (similar to OBV).

CMF is a volume-weighted average of accumulation and distribution over a some period of time (typically 21). It's a way of measuring accumulation versus
distribution in an asset, and oscillates around a zero line. You would use it similarly to any other oscillator, in that you can look for divergences, and general positive or negative momentum.

Chaikin Oscillator is basically a MACD (without signal line) of the accumulation and distribution index (or line--which is somehow different than simply accumulation and distribution). I haven't looked into these differences deeply, but if you look below at the calculations, and substituted 'ad' for 'accdist' you get very different readings. I actually did that, and what it looks like it would do is turn the actual Oscillator into a MACD signal line. So, by substituting 'ad' for 'accdist' (or the accumulation/distribution index) you produce a signal line of the Chaikin Oscillator .
Anyway, all that confusion out of the way, as I said, it's a MACD on the accumulation and distribution index, therefore it is another zero line oscillator, and similarly to CMF , it's a way of measuring price movements in the chart versus a/d. The zero line isn't just any old zero line, however, it is actually the accumulation distribution line. I've made an OBV version of this by substituting the OBV for AD, so if you prefer OBV maybe you will like that.

Pos . & Neg Net Volume is actually an indicator I had seen made by RafaelZioni. It basically takes net volume , calculates a cumulative of that, then subtracts a moving average of some period from the cumulative net volume in order to create a volume oscillator. Use it like the other oscillators!

Added Donchian Channels , moving averages, Bollinger Bands , colored everything, and alerts.

Enjoy!

Below I will post images with the different indicators, everything on default settings (except for lookback period, which I have adjusted to my personal preferences).

Above is an image with the MFI being compared to the RSI since they are very similar ( MFI being basically a volume derivative of the RSI ).

Chaikin Money Flow set to lookback of 13. You could probably extend that a bit if you wanted to smooth the line more.

Chaikin Oscillator and Chaikin Oscillator of OBV, with a zoomed in look below, to see the differences more clearly.

CO and COBV closer look.

Positive & Negative Net Volume .
Notas de Lançamento: I just changed 'power' to a float from an integer so that you can fine tune the moving average more. It was something that someone pointed out to me in a comment of another indicator I released.
Notas de Lançamento: Been adding auto-plotting divergences to my indicators of late.

I have to say this was kind of a bad spot to take a screenshot, in terms of divergences. Probably the worst spot I could have chosen, tbh. Every indicator on the planet was showing divergences on this grind up from 30k to 50k on bitcoin. And then of course the typical pop all the way at the top that destroys an divergences (except for CMF, apparently? (though it's close)) and traps bulls.
Notas de Lançamento: changing the bandwidth of the donchian bands to a float in half steps, so you can adjust it a bit more minutely. Thought I had changed this across all indicators, but obviously missed it here.
Notas de Lançamento: added alerts for divergences and clarified alert messages
Notas de Lançamento: -converted to pinescript 5
-fixed formula for OBV - previous formula using rate of change instead of just change, was so it could be smoothed, but smoothing obv doesn't work out that great (at least by using rate of change). Consequently it screwed up the Chaikin Osc. OBV because it was double smoothing that. Chaikin OBV works much better now, and changing lookback periods produces results that make much more visual sense.
-added colors for center line cross, so the oscillator and candles are highlighted only if they are above or below the center line
-improved the reading of some menu items
--added a couple moving averages
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?