BacktestRookies

Volume Profile: Intra-bar Volume

This indicator was developed as part of a free blog post tutorial on the Backtest-Rookies website for detailed code commentary, head over there.


Scope

The indicator shall attempt to do the following:

  • Look at a lower time-frame. E.g 5 minutes when on a 1-hour chart.
  • Create a function to loop through through candles and make an assessment.
  • If the candle it closed up, the volume will be categorized as buying volume. Conversely, if it closed down, the volume will be categorized as selling volume
  • The function will then be passed to the security() function to run on a lower timeframe.
  • All buying volume and selling volume from the lower time-frame shall be summed and displayed on the main chart.

Important Note
This indicator will not give you genuine buying or selling volume. It simply follows the assumption that if price closed up, there must have been more buyers than sellers and if it closed down we assume the opposite.

Usage

In order to use this indicator, users will need to calculate how many lower time-frame bars are contained in the time-frame on the main chart. So for example, the default settings are configured for the indicator to be run on the 1H chart. As a result, we need to set the "Bars on Lower Timeframe" input to 12. This is because there are 12 x 5-minute bars in 60 minutes.


Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?