Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 GLFX005, Today, 03:23 AM
        0 responses
        1 view
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        11 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        6 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        12 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Working...
        X