TradingView
ruckard
31 paź 2020 17:06

VPoC per bar 

Bitcoin / TetherUS PERPETUAL CONTRACTBinance

Opis

This study prints the current bar VPoC as an horizontal line.


It's aimed originally at BTCUSDT pair and 15m timeframe.




[B]HOW IT WORKS[/B]
Zoom In mode: This is the default mode.
The study zooms in into the latest 15 1-minute bar candles in order to calculate the 15 minute candle VPoC.
Zoom Out mode: The VPoC from the last n bars from the current timeframe that match desired timeframe is shown on each bar.

In either case you are recommended to click on the '...' button associated to this study
and select 'Visual Order. Bring to Front.' so that it's properly shown in your chart.

[B]HOW IT WORKS - Zoom In mode[/B]
  • Make sure that '(VP) Zoom into the VP timeframe' setting is set to true.
  • Choose the zoomed in timeframe where to calculate VPoC from thanks to the '(VP) Zoomed timeframe {1 minute}' setting.
  • Change '(VP) Zoomed in timeframe bars per current timeframe bar {15}' to its appropiated value. You just need to divide the current timeframe minutes per the zoomed in timeframe minutes per bar. E.g. If you are in 60 minute timeframe and you want to zoom in into 5 minute timeframe: 60 / 5 = 12 . You will write 12 here.


[B]HOW IT WORKS - Zoom Out mode[/B]
  • Make sure that '(VP) Zoom into the VP timeframe' setting is set to false.
  • If you are using the Zoom out mode you might want to set '(VP) Print VPoC price as discrete lines {True}' to false.
  • Either choose the zoommed out timeframe where to calculate VPoC from thanks to the '(VP) Zoomed timeframe {1 minute}' setting or turn on the '(VP) Use number of bars (not VP timeframe)' setting in order to use '(VP) Number of bars {100}' as a custom number of bars.


[B]WARNING - Zoom In mode last bar[/B]
The way that PineScript handles security function in last bar might result on the last bar not being accurate enough.
[B]SETTINGS[/B]

[B]__ SETTINGS - Volume Profile[/B]

  • (VP) Zoomed timeframe {1 minute}: Timeframe in which to zoom in or zoom out to calculate an accurate VPoC for the current timeframe.
  • (VP) Zoomed in timeframe bars per current timeframe bar {15}: Check 'HOW IT WORKS - Zoom In mode' above. Note: It is only used in 'Zoom in' mode.
  • (VP) Number of bars {100}: If 'Use number of bars (not VP timeframe)' is turned on this setting is used to calculate session VPoC. Note: It is only used in 'Zoom out' mode.
  • (VP) Price levels {24}: Price levels for calculating VPoC.


[B]__ SETTINGS - MAIN TURN ON/OFF OPTIONS[/B]
  • (VP) Print VPoC price {True}: Show VPoC price
  • (VP) Zoom into the VP timeframe: When set to true the VPoC is calculated by zooming into the lower timeframe. When set to false a higher timeframe (or number of bars) is used.
  • (VP) Realtime Zoom in (Beta): Enable real time zoom for the last bar. It's beta because it would only work with zoomed in timeframe under 60 minutes. And when ratio between zoomout and zoomin is less than 60. Note: It is only used in 'Zoom in' mode.
  • (VP) Use number of bars (not VP timeframe): Uses 'Number of bars {100}' setting instead of 'Volume Profile timeframe' setting for calculating session VPoC. Note: It is only used in 'Zoom out' mode.
  • (VP) Print VPoC price as discrete lines {True}: When set to true the VPoC is shown as an small line in the center of each bar. When set to the false the VPoC line is printed as a normal line.


[B]__ SETTINGS - EXTRA[/B]
  • (VP) VPoC color: Change the VPoC color
  • (VP) VPoC line width {1}: Change VPoC line width (in pixels).
  • (VP) Use number of bars (not VP timeframe): Uses 'Number of bars {100}' setting instead of 'Volume Profile timeframe' setting for calculating session VPoC. Note: It is only used in 'Zoom out' mode.
  • (VP) Print VPoC price as discrete lines {True}: When set to true the VPoC is shown as an small line in the center of each bar. When set to the false the VPoC line is printed as a normal line.



CREDITS

I have reused and adapted some code from
"Poor man's volume profile" study
which it's from TradingView IldarAkhmetgaleev user.
Komentarze
liziming
Different from the system vp display, why?
ruckard
@liziming, The trader who requested this indicator seemed to like using those VPoC from lower timeframes. It was so long ago that I'm not sure what was the rationale behind it.
Probably if they are too close between candles then they act as support/resistance.

Also check my other indicator: 'Historic VPoCs and pseudo VPVR' which works more as the default Volume Profile indicator if that's what your question was about.
liziming
@ruckard, Thanks, I mean poc’s position in a bar is different from the system’s.
ruckard
@liziming, Check @Snowgar conversation below. I have already explained this topic.
TBellocci
Hello,
Could you also make it possible to display the VAH and VAL of the bar, in addition to VPOC ?
Thanks
ruckard
@TBellocci, I'm focused on other type of strategies but if you point me to some profitable strategies that make use of VAH and VAL I might take a look at it.
sidelined
Amazing Work dude!
Cr1ptoHos
This is actually accurated (15 min chart), i've checked with other sources. What number do I need to enter if I want 1h, 4h and 1d chart? (VP) Zoomed in timeframe bars per current timeframe bar {15})
It looks like there is a bug, because selecting different chart from 15 min, it gives the vpoc in every bar close, like there's no analysis. Thanks!
ruckard
@Cr1ptoHos, Check HOW IT WORKS - Zoom In mode section at the description. It's explained there all the settings you need to modify.
Cr1ptoHos
@ruckard, Yes, that's what I'm doing. I choose 60 min (for 1h chat) in "(VP) Zoomed in timeframe bars per current timeframe bar {15}" but looks like the VPOC always is in the bar close.
Can you check it out?
Więcej