Volume on price/volumeprofile q's

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #66219 quote
    Seabiscuit
    Participant
    Junior

    Been using vol on price for a while, but getting annoyed that I can’t switch sides. Does anyone know if theres a way to get vop to the right side of the chart?

    #87294 quote
    Nicolas
    Keymaster
    Master

    Sorry but no, that’s not possible. There is no setting to choose the side of the screen.

    volume-on-price-levels.jpg volume-on-price-levels.jpg
    #87299 quote
    Vonasi
    Moderator
    Master

    I tried to create something like the Volume on Price indicator but one that only looked at a certain number of candles (a look back period) rather than all that are on the chart. I didn’t manage to get it to work. Do you think that something like this is possible Nicolas?

    #87301 quote
    Nicolas
    Keymaster
    Master

    Yes with a loop starting from the current bar, a good example is this indicator: Bull & Bear Volume-by-Price levels

    a recent discussion to make it look at VPOC also: Bull & Bear Volume-by-Price levels modo VPOC

    #87304 quote
    Vonasi
    Moderator
    Master

    Thanks Nicolas – that first link is exactly what I was trying to create. I did search as I seemed to remember seeing it in the library at some point but it didn’t come up in the search – or was too far down the page for me!

    #87310 quote
    Vonasi
    Moderator
    Master

    I think it would be interesting to convert your bull/bear volume on price indicator so that it checks which is the highest volume price area at every bar for a look back period and then draws a line on the chart that represents this. The line would represent the recent history of maximum price on volume. I’m not sure if the results would be useful and I suspect it would take forever to draw but it might be interesting.

    #87311 quote
    Vonasi
    Moderator
    Master

    In fact thinking about it it would need a pair of band lines for where maximum bull volume is and a pair of band lines for where maximum bear volume is and then one pair of bands for where combined maximum volume is. It might get a bit messy. I think it is raining tomorrow so I might give it a look anyway.

    #87497 quote
    Vonasi
    Moderator
    Master

    I created the indicator I described above and it was slow to draw and very messy with six price bands on the chart. I adapted it slightly so that it just showed the mid point of each price range if that was where the maximum bull volume or bear volume was. Initial analysis seems to show that it tells us very little about support or resistance levels which kind of means that the standard volume on price indicator doesn’t either.

    Here is the code if anyone is interested:

    defparam calculateonlastbars=200
    
    //NbrBars=12
    //lookback=200
    
    hh=highest[lookback](high)
    ll=lowest[lookback](low)
    div = (hh-ll)/NbrBars
    i=0
    volsum=summation[lookback](volume)
    lastbulltotal = 0
    lastbeartotal = 0
    
    while i<NbrBars do
    lrange=ll+div*i
    hrange=lrange+div
    volbull=0
    volbear=0
    for j = 1 to lookback do
    if close[j]>=lrange and close[j]<=hrange then
    if close[j]>open[j] then
    volbull=volbull+volume[j]
    else
    volbear=volbear+volume[j]
    endif
    endif
    next
    bullbar = round((volbull*lookback)/volsum)
    bearbar = round((volbear*lookback)/volsum)
    
    if bullbar > lastbulltotal then
    lastbulltotal = bullbar
    lastbullhrange = hrange
    lastbulllrange = lrange
    midbull = ((lastbullhrange - lastbulllrange)/2 + lastbulllrange)
    endif
    
    if bearbar > lastbeartotal then
    lastbeartotal = bearbar
    lastbearhrange = hrange
    lastbearlrange = lrange
    midbear = ((lastbearhrange - lastbearlrange)/2 + lastbearlrange)
    endif
    i=i+1
    wend
    
    return midbull coloured(0,128,0) style(line,2), midbear coloured(128,0,0) style(line,2)
    

    [attachment file=87498]

    Nicolas thanked this post
    Screenshot_1-5.png Screenshot_1-5.png
    #105094 quote
    thatguy
    Participant
    New

    Hello, does this work with version 10.3 ?

    #105180 quote
    Vonasi
    Moderator
    Master

    Hello, does this work with version 10.3 ?

    Yes.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

Volume on price/volumeprofile q's


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Seabiscuit @rseabiscuit Participant
Summary

This topic contains 9 replies,
has 4 voices, and was last updated by Vonasi
6 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/23/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...