How do you code colour between two Bollinger Bands

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #130813 quote
    Bard
    Participant
    Master

    Hi, I’ve searched and searched but can’t find any simple way to add a colour zone between two manually coded Bollinger Bands? I would also like to be able to control transparency too so the colour doesn’t obscure the candlesticks or overwhelms and second Bollinger band series.

    lag = ROUND((period-1)/2)
    data = (close + (close-close[lag]))
    
    ZLEMA = exponentialaverage[period](data)
    BolUp = SZLEMA+STD[period]*dev
    BolDn = SZLEMA-STD[period]*dev
    BollMid = SZLEMA

    Cheers,

    #130814 quote
    Vonasi
    Moderator
    Master

    Don’t bother to code it. Just return the values in your indicator and then use the ‘configure’ indicator window and add a colour zone between the values and then save the settings as default settings. Then even if you export the ITF file those will be fixed settings for the indicator and anyone who imports it will have the same colour zones.

    If you are drawing segments then it is slightly more difficult and you will need to draw vertical lines between the segments to add some basic colour.

    Bard and Bel thanked this post
    #130817 quote
    Bard
    Participant
    Master
    #130845 quote
    Nicolas
    Keymaster
    Master

    Before v11, we were used to code the background color with DRAWCANDLE or DRAWBARCHART, a simple trick but it works well. With v11, we can now change the color of a graphical object and therefore create real color zones with codes, examples: https://www.prorealcode.com/topic/array-variables-availability-in-prorealtime/#post-118817 (rectangular zones), or https://www.prorealcode.com/topic/array-variables-availability-in-prorealtime/#post-118818 (with triangle when the zone is not a square or a rectangle).

    Bard thanked this post
    #132636 quote
    Bard
    Participant
    Master

    Probability cones, those look interesting! Do you know when v11 is available to IG clients Nicolas?

    #132638 quote
    Vonasi
    Moderator
    Master

    I think that I can guess Nicolas’ answer…… ‘Ask IG!’

    Nicolas and Bard thanked this post
    #132930 quote
    Bard
    Participant
    Master
    IG Index emailed me this response in regard to the launch of V11 for IG clients:
    Thanks for your email and we unfortunately can’t provide a timescale of when this could possibly be but due to going  through extraordinary times there has been delays of projects so it is likely to happen later in the year.
    GraHal thanked this post
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

How do you code colour between two Bollinger Bands


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Bard @brad Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by Bard
5 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/09/2020
Status: Active
Attachments: No files
Logo Logo
Loading...