Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Performance issues with marketreplay

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

    Performance issues with marketreplay

    Hi
    I've some performance issues in backtesting with the market replay functionality.
    I've a non-proprietary indicator creating objects on the chart and a proprietary strategy. Also I've followed the best practices of the forum and I'm trying to delete the historical objects that the indicator creates with the following code:

    foreach (dynamic obj in DrawObjects.ToList())
    {
    if(!obj.Tag.ToString().Equals("XXXXXX"))
    {
    RemoveDrawObject(obj.Tag.ToString());
    }
    }

    After the execution, objects are apparently deleted from that list, but in the next iteration they appear again in the list.

    On the other hand they never disappear from the Drawing Objects panel.

    Could you kindly help me?

    Thanks!

    #2
    Hello egurenk,

    Below are links to a few examples of using RemoveDrawObject().
    https://ninjatrader.com/support/foru...30#post1062730
    https://ninjatrader.com/support/foru...79#post1061379

    In your script, have you added a print to ensure that the condition is evaluating as true when you expect it?
    https://ninjatrader.com/support/foru...121#post791121

    Is the logic calling Draw methods and drawing new objects?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    46 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X