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!
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?