ColorBetween regression ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #213576 quote
    bobt
    Participant
    Average

    Hello,

    I’m using multiple ColorBetween statements in an indicator, but only the last ColorBetween statement actually shows on screen.

     

    for example :-

    Var = RSI[14]

    ColorBetween(0,20,0,100,0,100) //Green Bar
    ColorBetween(80,100,100,0,0,100) //Red Bar

    Return Var AS “RSI”

     

    Only the red bar shows. I’m confident that this used to work.

    Is this a known issue ?

     

    Regards,

    Bob

    #213616 quote
    robertogozzi
    Moderator
    Master

    I never used it before, but… yes, it only can be used once.

    I suggest that you colour the area 21 to 79, to keep the OB and OS outside, so you can still see them better:

    ColorBetween(79,21,"Grey",35)   //light Grey area
    #213623 quote
    JS
    Participant
    Senior

    Or alternatively, use two colored rectangles…

    Var = RSI[14]
    
    //ColorBetween(0,20,0,100,0,100) //Green Bar
    //ColorBetween(80,100,100,0,0,100) //Red Bar
    
    DrawRectangle(BarIndex-100,0,BarIndex,20)Coloured(0,255,0,1)BorderColor(0,255,0,0)
    DrawRectangle(BarIndex-100,80,BarIndex,100)Coloured(255,0,0,1)BorderColor(255,0,0,0)
    
    Return Var
    robertogozzi and bobt thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

ColorBetween regression ?


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
bobt @bobt Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/21/2023
Status: Active
Attachments: 2 files
Logo Logo
Loading...