Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

7.0.1000.3, Market Replay crash

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

    7.0.1000.3, Market Replay crash

    Hi

    I ran a strategy in Market Replay mode at 500x speed with debug enabled and visual studio 10 attached and it caught an Access Violation Exception. I've seen this crash before come up randomly with different strategies. I see this error in the trace:

    Code:
    2011-03-05 09:19:48:391 Strategy.StrategyBase.CancelAllOrders: Order='292f0ac7ab584e20ac391dbe598b4b57/Replay101' Name='Trail stop' State=Filled Instrument='CL 03-11' Action=Sell Limit price=0 Stop price=90.24 Quantity=1 Strategy='test4' Type=Stop Tif=Day Oco='0e30999354dc461786e77ae99275db5f-255' Filled=1 Fill price=90.24 Token='292f0ac7ab584e20ac391dbe598b4b57' Gtd='12/1/2099 12:00:00 AM'
    2011-03-05 09:19:49:088 in OnUnhandledThreadException
    2011-03-05 09:19:49:101 ********* exception trapped *********
    2011-03-05 09:19:49:102 Unable to cast object of type 'System.DBNull' to type 'NinjaTrader.Strategy.StrategyBase'.
    2011-03-05 09:19:49:102    at NinjaTrader.Strategy.StrategyGridDisplay.OnStrategyStatus(Object sender, StatusChangedEventArgs e)
       at NinjaTrader.Strategy.StatusChangedEventHandler.Invoke(Object sender, StatusChangedEventArgs e)
       at NinjaTrader.Strategy.StrategyBase.StoppedNow()
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
    These are the latest entries in the log file:
    Code:
    3/5/2011 9:19:46 AM|1|32|Order='292f0ac7ab584e20ac391dbe598b4b57/Replay101' Name='Trail stop' New state=Working Instrument='CL 03-11' Action=Sell Limit price=0 Stop price=90.24 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
    3/5/2011 9:19:46 AM|1|32|Order='292f0ac7ab584e20ac391dbe598b4b57/Replay101' Name='Trail stop' New state=Filled Instrument='CL 03-11' Action=Sell Limit price=0 Stop price=90.24 Quantity=1 Type=Stop Filled=1 Fill price=90.24 Error=NoError Native error=''
    3/5/2011 9:19:46 AM|1|16|Execution='0ecf6e570dfa46599a75d58b4bed6cd3' Instrument='CL 03-11' Account='Replay101' Exchange=Default Price=90.24 Quantity=1 Market position=Short Operation=Insert Order='292f0ac7ab584e20ac391dbe598b4b57' Time='1/20/2011 9:04:07 AM'
    3/5/2011 9:19:46 AM|1|64|Instrument='CL 03-11' Account='Replay101' Avg price=90.24 Quantity=0 Market position=Long Operation=Remove Currency=Unknown
    3/5/2011 9:19:48 AM|1|128|Disabling NinjaScript strategy 'test4/f17a7704b70f437989dbb20e593f0708'
    Could you please check why this is even possible? Could this be a bug in the db code?

    Thanks,
    Tim.

    #2
    Tim, which instrument were you running this on? Can you replicate on one of the built-in strategies?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Instrument='CL 03-11'

      I was able to reproduce with a simpler strategy but with a custom bar type. I was not able to reproduce it with a built-in type (range). This might be due to the custom bar type.

      Tim.

      Comment


        #4
        Thanks for the reply, Tim. Please let us know if you are able to reproduce using a simple strategy and supported code. For more info on the exception, you may consider using Try-Catch blocks as outlined here:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        938 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        3 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        2 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        27 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Working...
        X