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.
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?