spacetrader

OBV Accumulation / Distribution combination v2

OBV takes difference between old close and new close and multiplies by volume without considering high and low.
This assigns the entire volume into a single direction even tho movement could've been in both.


Accum/dist takes difference between close and high and low without considering previous close or open. This causes huge deviation from OBV when you have close or open far from high or low and price moving in the other direction like in a series of descending hammers.


This is attempt to combine both so relative motion between candles is detected and volume direction is assigned based relative to movement within a candle to account for volume in both directions.

+ and - depends if close is above previous close (+ if above, - if below)

Maximum upward volume counts if close = high and previous close = low, this makes multiplier 1 and thus entire volume is counted upwards

Maximum downward volume counts if close = low and previous close = high, this makes multiplier -1 and thus entire volume is counted downwards.

Zero volume movement occurs when close = previous close.

Half upward volume movement occurs if close-previous_close is half the range from high-low.

Update:

Open used instead of previous close due to issues with grabbing previous close on some charts. This seems more accurate for gaps without volume.
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?