CryptoSmoy

OBV Oscillator %

OBV Oscillator in %
This indicator computes the regular OBV using the standard formula and then creates an oscillator out of it.

Differences with other OBV oscillators:
- Computed value is relative to 100; it’s a percentage (no more huge numbers on the right scale),
- Adds a reference line at 0,
- Oscillators are computed by comparing the current situation (short period) to previous data (long period); this indicator lets you configure both periods.
=> In other words, if you leave the short period to its default value 1, you are comparing the current state of OBV to past data (default value for long period is 20). If you want to smooth it a bit and encapsulate more data, you can set the short period to a higher value (1 is fine though).

To spot a divergence on regular OBV, you have to use the price range tool on both the standard OBV indicator and price and compare their values.
=> If values in % are similar, no divergence
=> If they are quite different, divergence is present (as observed on example above, 16.27% increase in price but only 5.16% increase in volume )

As *this* indicator makes the OBV oscillates in relation to past values, it’s needless to apply the price range tool between 2 OBV levels. It’s already factored in and divergences are visually more obvious to spot (as shown by the arrows on example above). Therefore divergences are spotted the exact same way as RSI , Stoch , etc.
版本注释: Correction to the script.
No longer in % as it showed some wrong results on past data.
The benefit of this version over other versions is now only that you can set both the short and the long ema for OBV (other scripts allow only long OBV period modification).
It’s not much and doesn’t really deserve a script, but TradingView doesn’t allow to delete a published 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.

想在图表上使用此脚本?