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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      94 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      80 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      75 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Working...
      X