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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        160 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        307 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        244 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        348 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        178 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X