Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Conditional Coloring between Bollinger Bands

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Conditional Coloring between Bollinger Bands

    I'm changing the color between Bollinger Bands dependent upon a determination of trend direction. To do that I'm using DrawRegion on each bar,

    DrawRegion("Trend" + CurrentBar, 1, 0, KUpper , KLower, Color.Empty, trendColor, bandAreaColorOpacity)

    This seems a pretty resource hungry method - does anyone have any alternate methods I could try which aren't such resource hogs?

    Rgds
    Paul

    #2
    Hi pauly139,

    I am not aware of anything that would do that exact effect, but you might consider one of the other draw objects or just color the background with another color between your points of interest.
    TimNinjaTrader Customer Service

    Comment


      #3
      You could override the Plot method and use the standard Framework graphics objects.

      I found an example here http://www.ninjatrader.com/support/f...9&d=1190425419

      Comment


        #4
        Been thinking about this for my own uses and thought:

        I wonder if you plot 2 BBs and collapse #1 to 0 Std Devs when the trend is up and # 2 when the trend is down. Color both regions, #1 - Red, #2 - Green. Both regions will always be colored, however since one is always equal to the middle line, you won't or shouldn't see it.

        I haven't tried it and it seems a terrible kludge, but it might be worth a try.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        579 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X