This study calculates the On-Balance Volume (OBV) and displays it in terms of its Z-Score.

OBV is a great momentum indicator . As the name suggests, OBV predicts changes in price based on the security's volume flow.

Formula:
if (Current Price > Previous Price)
then Current OBV = Previous OBV + Current Volume

if (Current Price < Previous Price)
then Current OBV = Previous OBV - Current Volume

if (Current Price == Previous Price)
then Current OBV = Previous OBV

As the formula shows, the OBV goes a step beyond just looking at the pure volume of a security. Instead, it factors in relative price action from period to period to reflect investor sentiment. As a result, we often look to the OBV to spot bullish or bearish trends while they are in the early stages of development or simply predict impending uptrends or downtrends.

To make the OBV easier to visualize, we converted the value to a Z-Score. The Z-Score is a simple statistical measurement and represents the current OBV value's distance from the mean OBV value in terms of # of standard deviations.

Users can adjust the values for the 2 upper bounds for Z Scores and 2 lower bounds. Additionally, the n value for z score calculation can be adjusted in the input menu. A higher n value means the z score will be based on a longer lookback period. A lower value will result in more sensitive readings.

Overall, I think this is an interesting way to represent OBV values and will be a valuable leading indicator.

~Happy Trading~

-Profit Programmers
www.profitprogrammer.com
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?