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 cmtjoancolmenero, Yesterday, 03:58 PM
    9 responses
    35 views
    0 likes
    Last Post cmtjoancolmenero  
    Started by DayTradingDEMON, Today, 09:28 AM
    4 responses
    23 views
    0 likes
    Last Post DayTradingDEMON  
    Started by geddyisodin, Yesterday, 05:20 AM
    9 responses
    50 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by George21, Today, 10:07 AM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by Stanfillirenfro, Today, 07:23 AM
    9 responses
    24 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X