• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exception in Running Strategy Analyzer

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

    Exception in Running Strategy Analyzer

    I am using Ninjatrader 7.0. When I run the Strategy Analyzer, I get the following C# exception (which is retrieved in the Trace file).

    What I found out is that when the Strategy Analyzer was started, it loaded the price data for an instrument in the timeframe of 1 min. For my test, I set the timeframe to a different one, say, 5 seconds. Then I clicked the Run Backtest button to start the Analyzer (which set the button disabled). After a while (a few minutes), nothing happened and the Run Backtest button became enabled again. Then I checked the trace file and found many exceptions like the following:

    ================================================== ============

    2012-01-04 03:26:56:241 ERROR: Failed to call 'Add' method for period type 'Second': Collection was modified; enumeration operation may not execute.
    2012-01-04 03:26:56:243 in OnUnhandledThreadException
    2012-01-04 03:26:56:247 *************** unhandled exception trapped ***************
    2012-01-04 03:26:56:247 Collection was modified; enumeration operation may not execute.
    2012-01-04 03:26:56:247 at System.Collections.ArrayList.ArrayListEnumeratorSi mple.MoveNext()
    at NinjaTrader.Data.MarketDataEventArgs.Process()
    at NinjaTrader.Cbi.Connection.OnRealtimeDataTimerTick (Object sender, EventArgs e)
    at System.Windows.Forms.Timer.OnTick(EventArgs e)
    at System.Windows.Forms.Timer.TimerNativeWindow.WndPr oc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ================================================== ============

    Any idea about this exception?

    #2
    Hi trador,

    Thanks for the post. What is the add statement you are using that causes this exception?
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      In my strategy, there is no Add() method directly used (Some Add() methods are used in the referred custom indicators). So I don't know how this Add() error is generated (I guess this Add() is some internal method in NinjaTrader?).

      I have run the same strategy before (a few days ago) and there was no issue. I have no idea what has caused this internal exception recently.

      Comment


        #4
        OK, I would just restart NinjaTrader and see if it's still reproducible. If so, please send us the latest version of your trace file.

        You will find the trace file in the Documents > NinjaTrader 7 > Trace folder.
        *The trace file will be named "trace.YYYYMMDD.txt"
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          How do I send you the trace file (what is the email address)?

          Comment


            #6
            My apologies - Please send to support 'at' ninjatrader 'dot' com and include a link to this thread.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              The trace file has been sent. Thanks.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bboyle1234, Today, 03:47 PM
              0 responses
              1 view
              0 likes
              Last Post bboyle1234  
              Started by caveat_lector, Today, 03:46 PM
              0 responses
              3 views
              0 likes
              Last Post caveat_lector  
              Started by fx.practic, Today, 03:29 PM
              0 responses
              3 views
              0 likes
              Last Post fx.practic  
              Started by Captain Jack, Today, 02:53 PM
              0 responses
              4 views
              0 likes
              Last Post Captain Jack  
              Started by Erwin Beckers, Today, 02:52 PM
              0 responses
              4 views
              0 likes
              Last Post Erwin Beckers  
              Working...
              X