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 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
      308 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      349 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X