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

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 helpwanted, Today, 03:06 AM
    0 responses
    3 views
    0 likes
    Last Post helpwanted  
    Started by Brevo, Today, 01:45 AM
    0 responses
    7 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    5 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    242 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Working...
    X