Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

bars.RemoveLastBar(isRealtime); multiple calls

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

    bars.RemoveLastBar(isRealtime); multiple calls

    I was trying to find out why my custom chart type isn't plotting correctly, and I came across this forum post. Specifically, NinjaTrader_Dierk says the following here:

    Check out "bars.RemoveLastBar()" in case you needed to replace last bar. Don't try to remove more than one bar by multiples calls in a row. Note: this is beyond what we provide support for.
    He states that you shouldn't do multiple calls which is exactly what I'm doing:

    Code:
    //if we addedthree last time, then remove those three bars; otherwise just remove the bar we added
                    if (addedThree)
                    {
                        bars.RemoveLastBar(isRealtime);
                        bars.RemoveLastBar(isRealtime);
                        bars.RemoveLastBar(isRealtime);
                    }
                    else
                    {
                        bars.RemoveLastBar(isRealtime);
                    }
    What's the reason you shouldn't do multiple calls in a row. And could this be causing my issue?

    Thanks.

    #2
    zwentz, as Dierk said, this is unsupported.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Right, was just looking for the reason why you wouldn't want to make multiple calls.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      152 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      89 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      133 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X