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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      245 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      157 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      165 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      250 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      201 views
      0 likes
      Last Post CarlTrading  
      Working...
      X