EmreKb

[EmreKb] Volume Analysis

I've noticed that many Pine coders calculate buy and sell volumes by considering the volume of a bullish candle as buy volume and the volume of a bearish candle as sell volume. However, I believe this approach isn't very logical, especially for candles with long wicks like pinbars.


Therefore, I've devised a method to calculate the buy and sell volumes of a candle by separately considering the sizes of its top and bottom wicks and its body. I distribute the volume of the candle equally among its top wick, body, and bottom wick sizes. If the candle is bearish, I consider the body volume as sell volume; if bullish, as buy volume. For the top and bottom wick volumes, since there's a two-way movement, I allocate half to buy volume and the other half to sell volume.

This indicator displays the sum of buy and sell volumes retrospectively up to the "lookback" value on the candle. You can set the lookback value to 1 to only visualize the buy and sell volume distribution of a single candle.

If this method has been used by another Pine coder, please inform me!
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?