Cumulated volume velocity

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #86590 quote
    Scubatron5000
    Participant
    Senior

    Hey Folks

    This is probably a real noob question but I have been using the Cumulated volume velocity indicator from the library here for some time and find it excellent. I have been trying though to adapt it so instead of just drawing a line it draws candles based on the calculation of the indicator. I have tried a hundred different ways to do it and had to admit defeat on how to make this work. Is there anybody that can do this or show me what line of code I need to use. Thank you so much, you guys really do such a good job with everything here.

     

    This is the link to the original indicator

     

    Cumulated Volume Velocity

     

    Thanks for any help

     

    Steve

    #86595 quote
    Vonasi
    Moderator
    Master

    What values do you want to use to use to create your candles as the indicator only returns two values, CumVolVel and avg? A candle has four values, open, high, low and close. We could draw a candle with no shadows using just the CumVolVel and avg and change the colour dependent on whether CumVolVel is higher or lower than the average like this:

    p = 10
    
    if(barindex>10) then
    sRange = (high-low)
     
    if(high<high[1] AND low<low[1]) then
    CumVolVel = CumVolVel[1]-sRange*Volume
    elsif(high>high[1] AND low>low[1]) then
    CumVolVel = CumVolVel[1]+sRange*Volume
    else
    CumVolVel = CumVolVel[1]
    endif
    endif
     
    avg = exponentialaverage[p](CumVolVel)
    
    r = 128
    g = 0
    
    if CumVolVel > avg then
    r = 0
    g = 128
    endif
    
    DrawCandle(CumVolVel,avg,CumVolVel,avg) COLOURED(R,G,0) BORDERCOLOR(0,0,0)
     
    RETURN

    [attachment file=86596]

    Scubatron5000 thanked this post
    #86962 quote
    Scubatron5000
    Participant
    Senior

    Thank you so much for your reply

    Sorry it has taken me so a couple of days to respond to you, I somehow missed your reply. You have answered my question perfectly and that explains why I could not do it! I was trying to create a open, high, low close candle so that explains why I could not get it to work as I never considered this fact.

    Once again thanks for the reply the community here is excellent and so helpful

     

    Steve

    #86967 quote
    Scubatron5000
    Participant
    Senior

    I had seen the example of the RSI made with the draw candle function of the signal line with high low open close candles and had thought maybe it was possible signal line on this indicator.

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

Cumulated volume velocity


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Scubatron5000
7 years, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/08/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...