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!
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?