Any suggestions about a momentum and volume indicator?

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #37352 quote
    Marcel van Vliet
    Participant
    Veteran

    The indicator on this screenshot approaches the effect where I am looking for the best.

    Instead of the colored zones It would make the indicator more clear when the zones are replaced for historgrams.

    #37527 quote
    Nicolas
    Keymaster
    Master

    Ok so to be clear, you want the middle of the Bollinger band (which is a simple MA) to be the the zero line?

    #37532 quote
    Marcel van Vliet
    Participant
    Veteran

    Yes, exactly.

    #37637 quote
    Nicolas
    Keymaster
    Master

    @Marcel

    This is the code of the indicator you described. Are you using it in a mean reversion theory? Or sign of exhaustion of the price in a trend following strategy? I may put this one into the library for the benefit of everyone.

    period=20
    
    c=Chandle[period](close)
    avg=average[period](c)
    
    osc=c-avg
    middle=average[period](osc)
    dev=std[period](osc)
    up=middle+dev*2
    dn=middle-dev*2
    
    return osc coloured(200,0,0) style(histogram),up style(dottedline),dn style(dottedline), middle style(line)
    #37645 quote
    Marcel van Vliet
    Participant
    Veteran

    Thanks a lot.

    But unfortunately in your picture the histogram is not build from the (dynamic) BB midline like the colored zone on my picture.

    I use this indicator as a sign of exhaustion of the price in a trend following strategy.

    By the way I named the indicator ‘Pressure Gage’

    #37654 quote
    Nicolas
    Keymaster
    Master

    To get the middle of your bollinger band at the zero level, you only need to substract an SMA20 to CMO, and that’s what the indicator did. But I made wrong bollinger up and down in my first code sorry, so this is the correct code:

    period=20
    
    c=Chandle[period](close)
    avg=average[period](c)
    dev=std[period](c)
    upper=avg+dev*2
    lower=avg-dev*2
    
    osc=c-avg
    up=upper-avg
    dn=lower-avg
    
    
    
    return osc coloured(200,0,0) style(histogram),up style(dottedline),dn style(dottedline)

    Please find attached comparison of the 2 indicators.

    GraHal thanked this post
    #37665 quote
    Marcel van Vliet
    Participant
    Veteran

    Great work, Thanks a lot!

    #37666 quote
    GraHal
    Participant
    Master

    I get attached, is this correct for the code in #37654 ??

    #40411 quote
    Marcel van Vliet
    Participant
    Veteran

    Hi Grahal,

    My excuses for my late reaction, I was on a holliday in the sun for a while.

    I have tweaked the pressure Gage indicator a little . I encluded the code of the indicator as I am using it now.

    period=20
     
    c=Chandle[period](close)
    avg=average[period](c)
    dev=std[period](c)
    upper=avg+dev*2
    lower=avg-dev*2
     
    osc=c-avg
    up=upper-avg
    dn=lower-avg
    
    if osc>0 then
    r=0
    g=0
    b=102
    endif
    
    if osc<0 then
    r=255
    g=102
    b=102
    endif
    
    return osc coloured(r,g,b) style(histogram),up style(dottedline),dn style(dottedline)
    
    Nicolas thanked this post
Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.

Any suggestions about a momentum and volume indicator?


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 23 replies,
has 3 voices, and was last updated by Marcel van Vliet
8 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/30/2017
Status: Active
Attachments: 6 files
Logo Logo
Loading...