Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Replay out of memory

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

  • ATI user
    replied
    thanks Brett

    so I does not make any difference that a multi series strategy has code that is not within a BarsInProgress test....

    so I could have the added series code anywhere within the privary series code without ever testing for BarsInProgress == 0

    please confirm

    Leave a comment:


  • NinjaTrader_Brett
    replied
    Hello,

    Only reason I could see this is if Code C and Code A shared same variables mabye or needed eachother to operate correcly.

    Or could just be coincidence and something else was causing it in the code you changed.

    Too many variables involved.

    What I would be interested in is if you can run an old cope of the code that is back to the way it was when it was crashing and either run it to make sure it reproduces the problem or send it in to support at NinjaTrader dot com ATTN: Brett and reference this forum and I could do some testing on it. Make sure it is actually the bad code causing the crash.

    Leave a comment:


  • ATI user
    replied
    I find this very interesting

    I have not been able to get replay to crash for several days...ever since I made the following code change;

    I add a one minute data series to an 8 range chart ES and was running my strat with this code:

    protected override void OnBarUpdate()
    {
    code A
    if ( BarsInProgress == 1 )
    {
    code B
    }
    if ( BarsInProgress == 0)
    {
    code C
    }
    } // end OnBarUpdate

    you can see that code A is not included in a BarsInProgress test...I assumed it would run in 0...and it did

    then I changed to this:
    protected override void OnBarUpdate()
    {
    if ( BarsInProgress == 1 )
    {
    code B
    }
    if ( BarsInProgress == 0)
    {
    code A
    code C
    }
    } // end OnBarUpdate

    and could not get replay to crash even though I have done many edits, compiles and rewinds

    QUESTION: is this likely responsible ...and is it poor coding....I had a similar issue with an indicator which is why I made the change

    thanks

    Leave a comment:


  • NinjaTrader_Jason
    replied
    Yes, can you please send me the files and tell me at what time (as per your PC clock) the strategy was disabled. Log and trace files can be found at the following locations.

    C:\-->Users-->*Windows user account*-->(My) Documents--> NinjaTrader 7--> Log--> log.20111013 for today. (log.yyyymmdd for any other date)

    C:\-->Users-->*Windows user account*-->(My) Documents--> NinjaTrader 7--> Trace--> trace.20111013 for today. (trace.yyyymmdd for any other date)

    Please send them to support[at]ninjatrader[dot]com. Put 'Attn Jason' in the subject header and reference this forum thread.

    Leave a comment:


  • ATI user
    replied
    Originally posted by NinjaTrader_Jason View Post
    Could it be the strategy experienced an order rejection? If a strategy order is rejected, the strategy is terminated.
    .
    strat detects rejected order and shutdown with message...this did not happen

    also I would expect a Log entry on a rejected order...right?

    this has happened a few times now...on next occurrence I will try to identify cause...maybe in Trace file?

    Leave a comment:


  • NinjaTrader_Jason
    replied
    Can you please tell me if you are able to reproduce the issue if you run the strategy under the same circumstances. NinjaTrader does not disable strategies on its own.

    Could it be the strategy experienced an order rejection? If a strategy order is rejected, the strategy is terminated.

    It can take a while to reset accounts depending on the trade history it contains. If a lot of trading was done, it can take a while for it to be reset.

    Leave a comment:


  • ATI user
    replied
    thanks...here is something new

    started strat on 1 july...ran thru to 22 july...maybe 1500 trades...NT disables the strat for no apparent reason ..i.e. no error message re memory...nothing in the Log...strange

    reset of replay101 took approx 10 minutes

    Leave a comment:


  • NinjaTrader_Jason
    replied
    The suggestion to replay only times for which market replay data is present is assigned to ID# 72. The suggestion of a higher replay speed has ID# 818.

    Leave a comment:


  • NinjaTrader_Jason
    replied
    Yes, I understand. Thank you for clarifying.

    The suggestion to only replay times when there is Market Replay data available has been forwarded.

    Leave a comment:


  • ATI user
    replied
    Originally posted by NinjaTrader_Jason View Post

    The Market Replay connection will replay all time between the From and To dates you have selected. If no data exist, no data will be processed.
    .
    of course it only processes data that is present...that is not the problem....the problem is that it plods through dates where data does not exist....i.e. it wastes time 'processing' dates where data does not exist...it is still grinding along at a slow pace even there is no data

    for example, I placed trades on July1, the strategy kept running through 18 July...so for July 2, 3, 4, 9, 10, 16 and 17 there was no data however replay still ran as if looking for data....this is extremely slow and a total waste of my time...maybe 30-40 mins processing 7 days without data.

    My point is that replay should skip forward to the next date with available data and not plod through the weekends and dates I do not want to replay. This would be a big improvement and save a lot of time for NT users.

    Leave a comment:


  • NinjaTrader_Jason
    replied
    Please note that the suggestion is added to the list of possible future enhancements.

    The Market Replay connection will replay all time between the From and To dates you have selected. If no data exist, no data will be processed.

    I will forward your suggestions to only replay data as well as a higher replay speed too. Thank you for your feedback.

    Leave a comment:


  • ATI user
    replied
    Originally posted by NinjaTrader_Jason View Post
    The suggestion to support an option to disable trade data from being stored during the Market Replay has been assigned to ID# 1322.

    Thank you for your feedback.
    Jason

    While the new code is being tweaked, perhaps you could ask why replay processes days with no trading (weekend) and days for which there is no downloaded replay data

    Replay should not process chronologically...instead it should process data. I am sitting here watching replay grind through July 2, 3, 4 to continue a trade initiated July 1. This is a huge waste of time.

    Also, perhaps if replay is not wasting resources storing useless data in the db it could be sped up to x1000 or higher. x500 is too slow and maybe is limited due to the storage issue

    Leave a comment:


  • ATI user
    replied
    Originally posted by sledge View Post
    I think I noticed this too the other week, after replaying the same week >5 times, REPLAY really got slower and slower. (About 40 trades a day in replay).

    At some point it became less painful to just restart NT.

    Note: This was subjective in nature - I did not do any official testing, it could have been the # of print statements I had, or testing modified strategy each time which took more cycles.
    yes...replay definitely accumulates a lot of data/history...the longer you continue placing trades, the slower it gets until it crashes...if you stop before then, it takes a very long time to reset the replay101 account which I assume is due to clearing history....history I for one could do without

    anything longer than a 2 or 3 days becomes a problem...I run into this every day as if often run up to 10 or 12 days...

    Leave a comment:


  • sledge
    replied
    Originally posted by ATI user View Post

    I notice each time I rewind and replay, it runs slower. Also it takes a long time to reset Replay101 and clear the history. For instance a day that makes 10 trades will rewind in a few seconds whereas a day makes 500 trades will take 3-5 minutes to rewind.
    I think I noticed this too the other week, after replaying the same week >5 times, REPLAY really got slower and slower. (About 40 trades a day in replay).

    At some point it became less painful to just restart NT.

    Note: This was subjective in nature - I did not do any official testing, it could have been the # of print statements I had, or testing modified strategy each time which took more cycles.

    Leave a comment:


  • ATI user
    replied
    ok...in the meantime...as a matter of interest to anyone with the same problem....here is my workaround:

    1. run start for 11 days of data...make 1000 trades....strat disables

    2. remove disabled strat from chart....change date in replay to another...NT hangs for 10 mins/crash...

    3. start NT...untitled/null workspace....connect to replay...NT hangs for 5 mins/crash....

    4. start NT...repair db....successful...connect to replay....NT hangs for 5 mins/crash....

    5. start NT...reset Replay101...connect to replay...success....

    As mentioned, replay can not handle much data without corrupting/jamming db.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by CaptainJack, 05-29-2026, 05:09 AM
0 responses
523 views
0 likes
Last Post CaptainJack  
Started by CaptainJack, 05-29-2026, 12:02 AM
0 responses
354 views
0 likes
Last Post CaptainJack  
Started by charlesugo_1, 05-26-2026, 05:03 PM
0 responses
277 views
1 like
Last Post charlesugo_1  
Started by DannyP96, 05-18-2026, 02:38 PM
1 response
365 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
338 views
0 likes
Last Post CarlTrading  
Working...
X