Bull & Bear Volume-by-Price levels

v10.3
Bull & Bear Volume-by-Price levels

This “Volume-by-Price” indicator shows the amount of volume for a particular price range selected with the “lookback” setting, which is based on closing prices. The bars are horizontal and shown on the left side of the chart to correspond with these price ranges. The bars are separated into 2 colors to clearly identify the bull and bear Volumes in each price range. By combining volume and closing prices, this indicator can be used to identify high-volume price ranges to mark support or resistance.

The code shows 12 Volume-by-Price bars by default, but users can increase or decrease this number to suit their preferences with the “NbrBars” setting. Be aware that due to some ProBuilder limitations, this setting, as well as the lookback one, cannot be extended very much.

For a better visualization of which side has higher volumes on each price range, I added a small square of the corresponding color.

The ScaleFactor setting is used to adapt the length of the bars, depending of your choice to have small or big bars plotted over the price chart.

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. juanj • 07/05/2018 #

    Love It!

  2. Marcel • 07/05/2018 #

    Great job, just what I needed.

  3. juanj • 07/05/2018 #

    The only problem is that it takes forever to load, even after changing calculateonlastbars=200

    • Nicolas • 07/05/2018 #

      You’ll need at least 201 bars for a 200 bars lookback. About loading time, I can’t help more sorry …

  4. Marcel • 07/05/2018 #

    Loading time is surmountable if you trade om the daily timeframe.

  5. ALE • 07/05/2018 #

    Great!

  6. James Bonnd • 07/05/2018 #

    do u have indicator for binary???

  7. Eloi • 07/05/2018 #

    Bonjour Nicolas, Merci ! Excellent code. Les zones sont à égales distances les unes des autres. Y aurait pas moyen d’affiner ?

    • Nicolas • 07/05/2018 #

      Désolé je n’ai pas compris la question.

  8. Eloi • 07/05/2018 #

    Excuse-moi, je n’étais peut être pas clair. Sur certaines zones, le prix passe à de très nombreuses reprises sur d’autres beaucoup moins. J’aimerai pouvoir différencier cela. Est-ce possible ?

    • Nicolas • 07/05/2018 #

      Je ne comprends pas de quelles zones on parle ? Le graphique représenté ici est simplement une somme des volumes sur les x dernières périodes et divisé en 12 parts égales.

  9. Eloi • 07/05/2018 #

    Ok je comprend mieux. Merci Nicolas

  10. macbartin • 07/05/2018 #

    Bonjour, si je souhaite utiliser l’indicateur “Market profile” : “Bull & Bear Volume-by-Price levels” et que je travaille sur une unité de temps 30Min! Alors je voudrais l’avoir en debut de journée. par exemple : ouverture DAX30 8:00 la ligné de départ comme a partir de 8:00.
    Il faut donc calculer comme cela : 22:00 (heure fermeture DAX30) – 8:00 (ouverture DAX30) = 14h00 de temps donc pour des bougies de 30Min il faut 14*2=28 (28 correspond au nombre de périodes à renseigner ?) pour pouvoir commencer au debut de la journée ?

  11. peppe novellino • 07/05/2018 #

    Hi Nicholas…the system shows me two errors. The first one is this: PRC_Bull&Bear Volume on Price (5 12 200); the second one is on the line 6, character 10 (defparam drawonlastbaronly=true). I took a picture of it but I dont’k how to attach it here.
    Thanks in advance

    • Nicolas • 07/05/2018 #

      Indicator is compatible from version 10.3
      To avoid code problems with bad copy paste, you should download the. .itf file and import it into your platform.

  12. peppe novellino • 07/05/2018 #

    Thanks Nicholas: I did it. I mean that I’ve imported the itf file that you’ve charged above, but it isn’t still working. I can’t understand what’s the problem

  13. peppe novellino • 07/05/2018 #

    Hallo Nicholas…I’ve been waiting for your aswer: maybe you can’t help me. All the best

    • Nicolas • 07/05/2018 #

      I think you have not a compatible version of PRT. What’s your broker?

  14. peppe novellino • 07/05/2018 #

    My broker is Binck bank, and I’m actually using version 10.2 (I think that Binck as a kind of use license for prorealtime)

    • peppe novellino • 07/05/2018 #

      Has a kind…sorry for the mistake

    • Nicolas • 07/05/2018 #

      Ok, so that confirm what I replied to you 7 days ago, your PRT version is too old and not compatible for graphics objects created by code.

  15. odin • 07/05/2018 #

    i nicoles i have posted a new forum topic with your indicator, to search for help.

  16. TAC Bolsa • 07/05/2018 #

    Hola Nicolas enhorabuena por el indicador podrías agregar una linea al indicador, indicado el Volumen Maximo.. en modo VPOC.

  17. TAC Bolsa • 07/05/2018 #

    Gracias Nicolas no te molestes.

    Ya he realizado mi propio indicador con un Volumen profile y un marker profile para el intradia para Prorealtime.

  18. TAC Bolsa • 07/05/2018 #

    Como sabes todo mis indicadores están bloqueados pero te dejo el enlace por si te interesa probarlo y compartir ideas o mejoras…..

    https://www.tiburonesdealetacorta.com/2018/11/tac-volumen-profile.html

    Mucho de este indicador parte de tu idea inicial, solo se tenia que mejorar.

  19. TAC Bolsa • 07/05/2018 #

    He publicado una nueva version para todos los valores

    https://www.tiburonesdealetacorta.com/2018/11/tac-volumen-profile-v1.html

    Gracias

  20. oracle • 07/05/2018 #

    Nicolas “podrías agregar una línea en el indicador, indicado el Volumen Máximo .. en modo VPOC”. como se pide por varios foreros y o no se puede hacer. ¿?.

    • Nicolas • 07/05/2018 #

      Se puede hacer, por favor haga una solicitud específica en el foro, gracias.

    • oracle • 07/05/2018 #

      Es esto lo que necesitas Nicolas

      https://www.prorealcode.com/topic/bull-bear-volume-by-price-levels/

      Si no dime como lo solicito..

    • oracle • 07/05/2018 #

      Me puede indicar si esto es suficiente para realizar su colaboración.

  21. Kris75 • 07/05/2018 #

    Hi Nicolas,
    Just a quick question:
    > how come the “volume on price” indicator of PRT is so quick and this great one you developped so “slow”;
    I makes no sens to me!
    Thanks anyway for this;
    Chris

  22. Kris75 • 07/05/2018 #

    😉 ok thanks

    What about creating a strategy based on this indicator using the same trick you used in “swing lines : https://www.prorealcode.com/topic/swing-lines-strategy/“, registering the different maximimums of volume level which are a definition of a support or resistance?
    Best,
    Chris

    • Nicolas • 07/05/2018 #

      no real trick, just storing each segment value into a variable.. 😉

  23. Kris75 • 07/05/2018 #

    BTW I tried to add a piece of code which makes the indicator automaticaly starts the “llokback” at the highest of the time frame but it did not work: here is what I tried (FYI the Add PRT code is down)

    but it givest me an error saying the highest only accept positive integer (I debugged it but could not make it work)

    for i=400 to barindex

    StartVol=highest[400](high)
    if high = StartVol then
    StartBar = barindex
    else
    StartBar =0
    endif

    if StartBar > StartBar[1] then
    LastStartBar = StartBar
    endif
    next

    hh=highest[LastStartBar](high)
    ll=lowest[LastStartBar](low)
    div = (hh-ll)/NbrBars
    i=0
    volsum=summation[LastStartBar](volume)

    while i=lrange and close[j]open[j] then
    volbull=volbull+volume[j]
    else
    volbear=volbear+volume[j]
    endif
    endif
    next
    bullbar = round((volbull*LastStartBar)/volsum)*scalefactor
    bearbar = round((volbear*LastStartBar)/volsum)*scalefactor

    drawrectangle(LastStartBar,lrange,LastStartBar+bullbar,hrange) coloured(46,139,87,255)
    drawrectangle(LastStartBar,lrange,LastStartBar+bearbar,hrange) coloured(255,0,0,255)

    if bullbar>bearbar then
    drawtext(“■”,LastStartBar+bullbar,(lrange+hrange)/2,Dialog,Bold,22) coloured(46,139,87)
    else
    drawtext(“■”,LastStartBar+bearbar,(lrange+hrange)/2,Dialog,Bold,22) coloured(255,0,0)
    endif
    i=i+1
    wend
    drawvline(barindex[LastStartBar])

    return

    • Nicolas • 07/05/2018 #

      Because your variable “LastStartBar” is sometimes equal to 0 or even negative, you should declare it in a way that it has a positive value in any case, like this:
      LastStartBar = max(1,startbar)

  24. Kris75 • 07/05/2018 #

    thanks for your help

  25. Kris75 • 07/05/2018 #

    Hello Nicolas,

    J’ai la même erreur avec ce code vous voyez d’ou cela vient ?

  26. Kris75 • 07/05/2018 #

    //PRC_Bull&Bear Volume on Price | indicator
    //05.07.2018
    //Nicolas @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge

    //defparam drawonlastbaronly=true
    //defparam calculateonlastbars=300

    // — settings
    //ScaleFactor = 5
    //NbrBars=25
    //lookback=50
    // — end of settings

    for i=0 to 400 do

    StartVol=highest[400](high)
    if high[i] = StartVol then
    StartBar = i
    //else
    //StartBar =1
    endif

    if StartBar > StartBar[1] then
    LastStartBar = max(1,startbar)
    endif
    next

    hh=highest[LastStartBar](high)
    ll=lowest[LastStartBar](low)
    div = (hh-ll)/NbrBars
    i=0
    volsum=summation[LastStartBar](volume)

    while i=lrange and close[j]open[j] then
    volbull=volbull+volume[j]
    else
    volbear=volbear+volume[j]
    endif
    endif
    next
    bullbar = round((volbull*LastStartBar)/volsum)*scalefactor
    bearbar = round((volbear*LastStartBar)/volsum)*scalefactor

    drawrectangle(LastStartBar,lrange,LastStartBar+bullbar,hrange) coloured(46,139,87,255)
    drawrectangle(LastStartBar,lrange,LastStartBar+bearbar,hrange) coloured(255,0,0,255)

    if bullbar>bearbar then
    drawtext(“■”,LastStartBar+bullbar,(lrange+hrange)/2,Dialog,Bold,22) coloured(46,139,87)
    else
    drawtext(“■”,LastStartBar+bearbar,(lrange+hrange)/2,Dialog,Bold,22) coloured(255,0,0)
    endif
    i=i+1
    wend
    drawvline(barindex[LastStartBar])

    return

    • Nicolas • 07/05/2018 #

      ça vient de la même erreur, on ne peut avoir 0 comme période dans un indicateur et LastStartBar doit être à 0 dans l’une des premières itérations du code.

  27. Kris75 • 07/05/2018 #

    Hello Nicolas,
    C’est énigmatique pour moi ; pouvez-vous corriger le code ? Je pense que ce sera plus apprenant ; merci

    • Nicolas • 07/05/2018 #

      Dans le code, il n’y a qu’à cet endroit ou tu déclares que LastStartBar doit être à minima égal à 1:
      if StartBar > StartBar[1] then
      LastStartBar = max(1,startbar)
      endif
      Hors si cette condition n’est pas vrai, LastStartBar est toujours égal à 0 à la première lecture du code, d’ou l’erreur générée par la plateforme. Je pense que tu devrais arriver à corriger cette petite erreur 🙂

  28. Kris75 • 07/05/2018 #

    J’ai essayé cela mais ça produit des traits verticaux

    if StartBar > StartBar[1] then
    LastStartBar = max(1,startbar)
    else
    LastStartBar = 1
    endif

  29. Kris75 • 07/05/2018 #

    Hello Nicolas,
    je bloque ;
    je veux bien avoir votre correction de cet indicateur fonctionnant sur les plus hauts de derniers X unités ;
    merci
    Christophe

  30. Kris75 • 07/05/2018 #

    j’ai l’impression que ce code ne permet pas de connaitre le N° de la bougie correspondant au plus haut ;

  31. Kris75 • 07/05/2018 #

    StartVol=highest[400](high)
    for j=0 to 4000 do
    if high[j]=StartVol then
    Start = j
    break
    //break//else
    ////StartBar =1
    endif
    next

  32. Kris75 • 07/05/2018 #

    celui-la

    StartVol=highest[400](high)
    for j=0 to 400 do
    if high[j]=StartVol then
    Start = j
    break
    //break//else
    ////StartBar =1
    endif
    next

  33. Kris75 • 07/05/2018 #

    Hello Nicolas,
    Pour info tous les commentaires ont disparu !!!

    • Nicolas • 07/05/2018 #

      il faut cliquer sur ‘older comments’.

  34. Kris75 • 07/05/2018 #

    ‘older comments’ non visible pour moi ;
    idem pour la barre supérieure ou l’on peut ‘souscrire’ et mettre en ‘favori’

  35. Kris75 • 07/05/2018 #

    pb reproduit sur edge

  36. JMat45 • 07/05/2018 #

    Hi, thanks for this, Nicolas. Quick question: can this be modified so that, for intraday timeframes, it displays the relevant volume at price levels at the start of each new trading day based on the last trading day, like here: https://images.app.goo.gl/cc3oRLoeUMcHDrrK6
    I have seen Kris75’s variations on your work, but wanted to pose the question to you first. Thanks.

  37. Pascale31 • 07/05/2018 #

    Hello, I would like to know if there is a screener compliant with this indicator (Bull & Bear Volume-by-Price levels) ?
    Kind regards

    • Nicolas • 07/05/2018 #

      I don’t think so, I can’t remember, but you can try to search in the forums.

  38. sixeight • 07/05/2018 #

    Hello Nicolas,
    This is just what I’ve been looking for, but I have a few questions:
    1. Is it possible to increase the number of bars above 20? I tried 50 but I get a loop error.
    2. Is it possible to do it on a set timeframe/session?
    3. Is it possible to show previous days/sessions profiles?
    Thanks for any help 🙂

    • Nicolas • 07/05/2018 #

      1. yes
      2. maybe yes?!
      3. why not?

  39. patapouf • 07/05/2018 #

    Bonjour Nicolas.
    Je viens de découvrir cet indicateur, que je trouve bien intéressant
    Mais j’ai un petit problème technique (peut-être lié à la version 11 de PRT ?).
    Précision : j’ai importé la file *itf ci-dessus sans rien y changer.
    Les rectangles ne sont pas colorés, et ils sont donc difficiles à voir sur le graphe (malheureusement, impossible ici d’ajouter une pièce jointe pour envoyer la copie d’écran).
    As-tu idée d’où cela peut-il provenir ?
    Merci par avance

    • Nicolas • 07/05/2018 #

      Tu peux modifier le paramètre “scalefactor” pour adapter la hauteur des barres à ton graphique / écran.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+24 more likes

Related users ' posts
NEOMKEY Magnífico !!!. Al menos para mí. Gran trabajo con tus aportes Iván. Mira a ver si le incluye...
Iván jajaja gracias :)
oliTR Very good Iván ! However what would be the modification to add to the code in order to dis...
Armand2020 Bonjour , super taf!! serait il possible de faire un poc dynamique en timeframe 5 min en mod...
philippe59139 voici ce qu'il faudrait faire ou ajouter: //poc dynamique defparam calculateonlastbars=1...
pouille Merci beaucoup vraiment beau boulot, j'adore je m'en sert régulièrement
Iván
8 months ago
Iván I personally like it in daily timeframe
oliTR Many thanks Ivan, I copy/paste your code to try it but could only get a constant stable unif...
Iván Hi, I've copied the code above and it works... what asset are you trying? $indices array ...
Razz Bonjour Je pense que votre indicateur est très bon. Serait-il possible d'afficher la heatma...
philippe59139 if marketEtHeamap=1 then drawtext("#touch#",barindex+10,checkprice,SansSerif,Standard,10) c...
philippe59139 voici pour toi RAZZ il te faut simplement ajouter les drawtext https://www.prorealcode.com...
JS
1 year ago
steffen_burat Hello Nicolas, I have a cumulative histogram update problem, the indicator often updates ...
taklause Hello Nicolas, if I try to use your indicator in a trading system, the error on prc pops up ...
Gio56 Bonjour Nicolas J'ai le meme souci que steffen , l'indicateur ne cumule qu'après avoir redé...
Rafa Hi Nicolas! I can´t install this indicator. it installs in a separate window not as an av...
Nicolas Add it on the price, see how: https://www.prorealcode.com/blog/video-tutorials/how-to-add-an...
Frankyslo1 No consigo instalarlo en el precio en PRL-version 10
Khaled As this section of the forum is in English, I'll reply in English. I'm using PRT v11, so I d...
sal157011 Don't understand where it says: "Volume Pressure Histogram: Columns plotted in positive are ...
Khaled Not sure to understand the question. However, the columns (Histogram) represent the variable...
Alai-n Cela fonctionne très bien !!! Super Merci
andreabarbuscia Ciao Nicolas, molto bello questo indicatore, l'ho apprezzato molto. Lo sto testando insieme...
Alai-n Je poste ici un lien afin de mieux appréhender le CVD-Cumulative Volume Delta : https://www....
Nicolas
2 years ago
DELBERT Bonsoir , Nicolas , j'ai transféré votre indicateur sur ma PRT 10,3 et j'ai un méssage d'ére...
Nicolas Vous pouvez essayer en remplacant la ligne avec: vwapsd = sqrt(average[lengthz](square(clo...
DELBERT Bonsoir , merci Nicolas , a bientôt .
ChemaGeek Bonjour Nicolas, j'ai récemment découvert cet indicateur (Regularized Momentum 2017) et je l...
YvesRobert Bonjour, nouveau sur PRT (qq jours), j'essaie un peu de voir quel type d'indicateur me convi...
Ichimoku Reading I don't know in this case, I just downloaded it again and no problem for me. Try to downloa...
Ichimoku Reading What's the error that appears ?
Suzu Yuk Yes, it worked with 1Tick with 200 K . Thank you very much.
Monobrow Hi Daniele Thank you for the indicator, it looks very good. However, I have a problem so...
avatar
Anonymous Thanks very much for sharing, look forward to testing this idea out.
mathiasKN Thank you Daniele for making this script, I know its been some time since the release but wo...
Barrabas15 Apparently, according to the attached data, there is an error in the indicator code. Attach...
Barrabas15 The files are at the end of the following link: https://www.prorealcode.com/topic/time-seg...
robertogozzi Thank you Barrabas15, the correct code is at https://www.prorealcode.com/topic/time-segmente...
Nicolas esta possible
bolsatonimora2 Hola Nicolas, perdona la molestia, pero podrias codificar el screener para rupturas de sopor...
Nicolas Utilice los foros para solicitar una codificación personalizada.
GARNIEPI hello I am looking for an anchored vwap intraday, indicator which allows you to visualize th...
withoutwings To be able to flexibly wrap around the full 24h (i.e. past midnight), or to use just a singl...
yeoreum Thank you very much for the screener, it reminds me on Minervini VCP. How to change th...
reecet any codes like this but in minutes and hours rather than days?
PHAN100 bonjour, je viens de tester ce screener, je constate une anomalie...il ne renvoie pas l'e...

Top