Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Region question

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

    Draw Region question

    Hello,
    I'm trying to create an indicator that will change the color between the MA's based on conditions. I can't figure out how to "turn off" the conditions. As a result the colors are getting blended. Can anyone offer me a suggestion? Thanks.

    Code:
    if (VMAZones(9, 2, 18).Upper[0] > RSChannel(9, 1.5, 3, 14, 10).Mid[0])
                {
                    DrawRegion("Holding Up" , CurrentBar, 0, VMAZones(9, 2, 18).Upper, VMAZones(9, 2, 18).Lower, Color.Black, Color.Lime, 2);
                }
               
                
                if (VMAZones(9, 2, 18).Lower[0] < RSChannel(9, 1.5, 3, 14, 10).Mid[0])
                {
                    DrawRegion("Holding Down" , CurrentBar, 0, VMAZones(9, 2, 18).Upper, VMAZones(9, 2, 18).Lower, Color.Black, Color.Chocolate, 2);
                }

    #2
    Hello CaptainAmericaXX,
    To assist you further can you please send a toy NinjaScript code* replicating the behavior to support[AT]ninjatrader[DOT]com

    Please use the export feature of NinjaTrader to send the code.


    Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

    I look forward to assisting you further.

    *The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.
    JoydeepNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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