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

BarColorSeries weirdness...

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

    BarColorSeries weirdness...

    I searched and could not find any reference to what I'm seeing.

    If I set a custom bar color via BarColorSeries[0] in OnBarUpdate, the bar displays in my custom color. No problem.

    Later... outside of OnBarUpdate() I attempt to set a bar color using ChartControl.BarColorSeries[nBarIdx].

    My logic is fine, the index is valid, however, the bar color does not update. It seems that if the bar color is at any time explicitly overriden in OnBarUpdate... It can't be changed to different color in the future... (at least not from outside OnBarUpdate()).

    I must be missing something, no? If I must, I can always just 'overpaint' the bar myself, but I'd prefer not to.

    Thx

    #2
    Is it possible that that StrategyBase.BarColorSeries is a separate object from ChartControl.BarColorSeries? And internal code uses the StrategyBase list if an element is not Color.Empty?

    Methinks this is likely. I'm going to try to explicitly use ChartControl.BarColorSeries in my OnBarUpdate to see if this is the case.


    And... yes. this is the case and the problem. Interesting that there are so many BarColorSeries laying around.

    Anyway... hope this helps others.

    Comment


      #3
      Your understanding is correct and thanks for posting your resolution here.
      BertrandNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by WHICKED, Today, 12:56 PM
      0 responses
      1 view
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by Spiderbird, Today, 12:15 PM
      2 responses
      10 views
      0 likes
      Last Post Spiderbird  
      Started by WHICKED, Today, 12:45 PM
      0 responses
      6 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by FrazMann, Today, 11:21 AM
      2 responses
      6 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by rjbtrade1, 11-30-2023, 04:38 PM
      2 responses
      80 views
      0 likes
      Last Post DavidHP
      by DavidHP
       
      Working...
      X