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 llanqui, Today, 03:53 AM
              0 responses
              6 views
              0 likes
              Last Post llanqui
              by llanqui
               
              Started by burtoninlondon, Today, 12:38 AM
              0 responses
              10 views
              0 likes
              Last Post burtoninlondon  
              Started by AaronKoRn, Yesterday, 09:49 PM
              0 responses
              15 views
              0 likes
              Last Post AaronKoRn  
              Started by carnitron, Yesterday, 08:42 PM
              0 responses
              11 views
              0 likes
              Last Post carnitron  
              Started by strategist007, Yesterday, 07:51 PM
              0 responses
              14 views
              0 likes
              Last Post strategist007  
              Working...
              X