OPEN-SOURCE SCRIPT

Historic VPoCs and pseudo VPVR

تم تحديثه
This study tries to recreate session based historic VPoCs
and VPVR Volume Profile
as they are used by
TradingLatino TradingView user.

It's aimed at BTCUSDT pair and 4h timeframe.

HOW IT WORKS
HOW IT WORKS - VPVR Profile Block
It gathers volume from the last chosen Bars
in order to draw the vpvr profile block

Volume that intersects with current level range
being studied is added to its value.

Additionally the current level price is modified
so that it matches the level price where most
of the volume has concentrated

So you get a pretty accurate price for drawn volume
while at the same time the levels are not stuck
to arbitrary level prices.

HOW IT WORKS - VPoC
It calculates a Volume Profile for the
given historic session but then
it only outputs that Volume Profile VPoC.

SETTINGS
  • Show VPVR Volume Profile {True}.
  • Show Historic VPoC lines {True}.
  • Show Historic VPoC labels {True}.
  • Extend Historic VPoC lines {True}: If this option is turned off the VPoC lines are only shown during the session duration.
  • Show tick difference from current price {False}: BETA. Feedback is needed because I'm not sure how it should work this setting.
  • VPVR Number of bars {100}: Define the Visible Range in number of bars so that its Volume Profile can be shown.
  • VPVR Profile width (in bars) {15}: VPVR Profile can be make larger or smaller in width thanks to this option.
  • VPVR Profile offset (in bars) {15}: VPVR Profile can be shown more to the left or to the right if the defaults do not suit you.
  • Historic Session Volume Profile timeframe {1D}: Historic VPoC use 1 day as their timeframe reference by default.
  • Number of decimal digits {2}: How many decimal digits are shown in label prices.
  • Number of previous sessions to print VPoC {5}: How many previous sessions VPoCs are to be printed. The maximum for this setting is 20.
  • Historic VPoC lines width (in pixels) {2}.
  • Historic VPoC labels size {small}.
  • History VPoC line offset (in bars) {5}: How far to the right VPoCs lines are to be extended. Note: This setting does not apply when 'Extend Historic VPoC lines' is set to 'False'.


WARNING
Please be aware that VPoC from the first previous session might not be accurate due to Pine Script limitations.

VPVR USAGE

This is not a VPVR like the official TradingView indicator.
This is a pseudo VPVR and that means it needs some manual input from you.
But, don't worry it's quite easy to do and if you always use the same number
of bars to calculate your VPVR then you might even just set it up once.

In order to show the VPVR (or Volume Profile on the Visible Range):
  • Rescale your chart so that you see all the bars for your Visible Range.
  • Click on the ruler tool.
  • Click on the last bar (far to the right) shown on the screen
  • Drag the ruler to first bar (far to the left) shown on the screen
  • Check what the ruler says
  • E.g. it says: 101 bars
  • Open this study settings
  • Modify: 'VPVR Number of bars [100]' setting
  • So that its value matches your measured number of bars (101)
  • Press OK to confirm and wait for the indicator to refresh.


STRATEGY USAGE
If your strategy uses VPoC
to define your resistances
or supports
you can check the VPoCs shown here.

FEEDBACK
I have only used this identifier in BTCUSDT 4h timeframe.
I'm interested to know what needs to be tweaked
in other securities and timeframes.

PINE STUDY TRICK
This study let's you choose the number of decimals the label will use.

CREDITS
I have reused and adapted some code from
'Poor man's volume profile' study
which it's from TradingView IldarAkhmetgaleev user.

I also wanted to thank him for helping me understanding his study.

I have reused some code from
'MTF Selection Framework - PineCoders FAQ' study
which it's from TradingView PineCoders user.
ملاحظات الأخبار
v20201024 update:
  • Fixed VPoC calculation
pointofcontroltradinglatinoVolume Profilevpocvpvr

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟


يعمل أيضًا:

إخلاء المسؤولية