Difference between BB and price

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #123571 quote
    segie
    Participant
    Senior

    Hi,

    I’m looking for an indicator that displays the pips/points difference  between upper or lower Bollinger Bands and Price.

     

    Regards,

    Segie

    #123585 quote
    Vonasi
    Moderator
    Master

    Something like this?

    p = 20
    
    upper = BollingerUp[p](close) - close
    lower = close - BollingerDown[p](close)
    
    return upper as "Upper Difference" coloured(0,128,0), lower as "Lower Difference" coloured(128,0,0)
    segie thanked this post
    #123594 quote
    segie
    Participant
    Senior

    Receiving this error (attached)

    BB_diff.jpg BB_diff.jpg
    #123598 quote
    Nicolas
    Keymaster
    Master

    Coloured must be placed right after the variable name, the syntax should be:

    p = 20
    
    upper = BollingerUp[p](close) - close
    lower = close - BollingerDown[p](close)
    
    return upper coloured(0,128,0) as "Upper Difference" , lower coloured(128,0,0) as "Lower Difference"
    segie thanked this post
    #123607 quote
    Vonasi
    Moderator
    Master

    Thanks Nicolas. Thrown together before I’d had a coffee and not tested!

    #123610 quote
    segie
    Participant
    Senior

    thank you

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

Difference between BB and price


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
segie @segie Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by segie
5 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/27/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...