Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Remove BarColor

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

    How to Remove BarColor

    Greetings Everyone,
    I successfully create a Custom Bar Color when conditions are met, however when the condition goes away I'd like to remove the Custom Bar Color (mid bar in a 1/2 hour bar). Tapping the F5 button refreshes, but there must be a command...right?

    if(Close[0] >= MyCondition) { BarColor = MyColor; }

    [and this below doesn't work]
    if(Close[0] < MyCondition) { RemoveDrawObject(MyColor); }

    Suggestions??
    Thanks!

    #2
    Hello,

    Yes this can be done by modifying a previous value



    example:

    Code:
    if(Close[0] >= MyCondition)
    {
      BarColorSeries[0] = MyColor;
    }
    
    if(Close[0] < MyCondition)
    {
      BarColorSeries[1] = SomeOtherColor;
    }
    Let me know if I can further assist
    LanceNinjaTrader Customer Service

    Comment


      #3
      Perfect !!!
      Thank you for your help.

      Jules

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      581 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      338 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
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X