Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

unhandled exception

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

    unhandled exception

    Hi

    When running Walk Forward Optimization on a group of 17 forex instruments, I keep getting the following error and ninjatrader crashes

    collection was modified; emuneration operation may not execute.

    When I run on each individual forex pair, it normally runs fine.

    Any ideas what is going on? I don't really understand the error message.

    Many thanks
    Steve

    #2
    Hello Steve,

    Thanks for opening the thread.

    Please answer the questions below so we can find out what is going on.
    1. Do you see results when running the same test on the SampleMaCrossOver strategy in NinjaTrader with the same settings as your strategy?
    2. Are you connected to your data feed provider when running this test?
    3. Do you see the same behavior using the standard FOREX instrument list that ships with NinjaTrader 8? (See image attached) Or is this specific to the 17 instruments you used?
    4. What Data Series Type have you selected? Example: Tick, Minute, Day
    5. What From and To date is selected?
    6. Is your strategy a multi instrument or multi time frame strategy?


    Thanks in advance, I look forward to resolving this matter with you.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi

      I'm not connected to the data feed (I've downloaded the data already)
      I'm using 15 minute data
      from 1 Jan 2010 to 30 Sept 2017 (Backtest = 2008 days, Walk fwd=822 days). Ive used these settings loads on other strategies I have and all fine.
      I do get the error using the NT8 forex instrument list
      All works fine using the Sample MA for my 17 forex instruments. Also, all works fine with my other strategies.
      I don't think its multi instrument or multi time frame.
      Tested each currency pair one by one now a couple of times. the currencies where I'm getting this error are
      gbpcad gbpchf usdcad usdchf

      The other 13 are fine! (on the 15 min charts in the parameters I'm testing anyway)

      Any ideas what could be going wrong with these 4 currencies?

      Many thanks
      STeve

      Comment


        #4
        Hello Steve,

        Thanks for providing feedback on those items.

        As the issue is central to one strategy and the instruments work with other strategies, we will need to take debugging steps to find out where the issue arises with this strategy. If this is a strategy that you have not written, you may wish to contact the developer and let them know you are hitting an error with those specific instruments. If you could also provide any reduced case and steps that can quickly reproduce the issue, it will help in tracking the root issue.

        If you would like to debug the code on your own, I have included some resources that can assist you in the process. I would start by looking looking for any collections used in the strategy and to make sure that they are properly reset for each optimization iteration. (See "Resetting class level variables for Strategy Analyzer Optimization" in the Best Practices link below for more information.)

        Debugging - https://ninjatrader.com/support/foru...ead.php?t=3418

        NinjaScript Best Practices - https://ninjatrader.com/support/help...urceManagement

        We can also have a member of our Business Development team reach out with information on NinjaScript Consultants if you would like to consider hiring a professional to debug the code.

        If debugging the code leads you to a reduced example that shows a corner case issue with NinjaTrader, please let us know so we can properly inform the development team for review.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by schmidtbc16, Today, 03:36 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by RT001, Today, 03:25 PM
        2 responses
        12 views
        0 likes
        Last Post RT001
        by RT001
         
        Started by mbrandau, Today, 01:58 PM
        5 responses
        33 views
        0 likes
        Last Post mbrandau  
        Started by remcovdmeulen, Today, 02:15 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by gbrad, Today, 09:57 AM
        7 responses
        15 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X