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...

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。