Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8061-Playback M.R.- unhandled exception trapped

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

    NT8061-Playback M.R.- unhandled exception trapped

    I have run this strategy on my laptops without much issue other than some trades not happening randomly that I can't prove out. http://ninjatrader.com/support/forum...light=playback

    I had originally run the 2 variations of the strategy on 8.0.4.0 and saved off the results. I upgraded to 8.0.6.1 today, and I am running the same 2 strategies from 1/20/2014 to 5/19/2017 on my desktop.

    It was definitely random...unless running 2 strategies at the same time could cause this.
    Using multiple contracts...

    Definitely something still a miss inside the NT code for the strategies grid.


    ******************* Session Start (Version 8.0.6.1) *******************
    2017-06-04 10:35:56:768 InstallDir='C:\Program Files (x86)\NinjaTrader 8\'
    2017-06-04 10:35:56:768 UserDataDir='S:\mydocs2016\NinjaTrader 8\'
    2017-06-04 10:35:56:768 MachineID='xxxx'
    2017-06-04 10:35:56:768 OS='Microsoft Windows NT 6.1.7601 Service Pack 1'/'Win32NT'
    2017-06-04 10:35:56:768 OSLanguage='en-US'
    2017-06-04 10:35:56:768 OSEnvironment='64bit'
    2017-06-04 10:35:56:778 Processors=12
    2017-06-04 10:35:57:811 ProcessorSpeed=2.9 GHz
    2017-06-04 10:35:57:812 PhysicalMemory=49152 MB
    2017-06-04 10:35:57:827 DisplayAdapters=2/ASUS Mirror Driver|NVIDIA GeForce GTX 780 Ti
    2017-06-04 10:35:57:827 Monitors=3/2560x1600|2560x1440|1920x1080
    2017-06-04 10:35:57:827 .NET/CLR Version='4.0.30319.42000'/64bit
    2017-06-04 10:35:57:827 SqlCeVersion='4.0.8482.1'1
    ...
    2017-06-04 17:38:55:022 (Playback Connection) Cbi.Account.ExecutionUpdateCallback: executionId='772561377a014d59aa17abc38fd6e241' account='Playback101' instrument='ES ##-##' exchange=Globex price=1839 quantity=4 marketPosition=Long operation=Add orderID='c829762687d540a58e4ed12fa391e117' isSod=False time='2016-01-20 09:54:56' statementDate='2016-01-20'
    2017-06-04 17:38:55:022 (Playback Connection) Cbi.Account.PositionUpdateCallback: instrument='ES ##-##' account='Playback101' avgPrice=0 quantity=0 marketPosition=Flat operation=Remove
    2017-06-04 17:38:55:022 (Playback Connection) NinjaScript.StrategyBase.Process.PositionEventArgs .Filtered: instrument='ES ##-##' account='Playback101' avgPrice=0 quantity=0 marketPosition=Flat operation=Remove

    2017-06-04 17:38:55:024 *************** unhandled exception trapped ***************
    2017-06-04 17:38:55:024 Exception has been thrown by the target of an invocation.
    2017-06-04 17:38:55:027 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
    at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
    at System.Collections.Generic.List`1.CopyTo(T[] array, Int32 arrayIndex)
    at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    at NinjaTrader.Gui.NinjaScript.StrategiesGrid.Calcula teRealizedProfit(StrategyBase strategy, Instrument instrument)
    at NinjaTrader.Gui.NinjaScript.StrategiesGrid.<OnPositionUpdate>b__69_0(PositionE ventArgs e)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeIn ternal(Object obj, Object[] parameters, Object[] arguments)
    at System.Delegate.DynamicInvokeImpl(Object[] args)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

    Previously happened 2/2/2017:

    Attached Files

    #2
    Hello sledge,

    Thank you for your report.

    Would you be willing to provide the two strategies so we may test this on our end?

    If so, you can send the files to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' in the subject line and a reference to this thread in the body of the email.

    You can export your strategies by going to Tools > Export > NinjaScript Add On > Add > select your strategies > OK > Export > name the file 'NTsupport' > Save.

    The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to your email.

    I look forward to your response.

    Comment


      #3
      I can't.

      If I come up with something I can,of course I will.

      But it's nothing I'm calling. It's that strategy grid code update fails when a trade is completed.

      Comment


        #4
        Got it in NT8.0.11.1, this time on my laptop as opposed to the desktop. I did run with "NVidia graphics" which was updated to latest prior to the run. Another test on another laptop in NT8.0.11.0 with NVidia graphics turned on did not produce this result. Results were identical on the 2 tests. Different version of code from previous, but identical in the 2 tests.

        Code:
        2018-01-07 18:37:58:523|1|8|Execution='2c82d3c3c9b743d19783c31026a9bf7a' Instrument='ES ##-##' Account='Playback101' Exchange=Default Price= Quantity=2 Market position=Long Operation=Operation_Add Order='0a216f6586e547799942b613e186a782' Time='4/7/2016 1:52 PM'
        2018-01-07 18:37:58:523|1|64|Instrument='ES ##-##' Account='Playback101' Average price=0 Quantity=0 Market position=Flat Operation=Remove
        [B]2018-01-07 18:37:58:535|0|4|Unhandled exception: Exception has been thrown by the target of an invocation.[/B]
        2018-01-07 18:38:25:589|1|16|NinjaScript strategy xxxx /126814225' submitting order
        2018-01-07 18:38:25:590|1|32|Order='aa10836133404ee9a5eb45eff12db8aa/Playback101' Name=xxxx New state='Submitted' Instrument='ES ##-##' Action='Buy' Limit price=0 Stop price=0 Quantity=4 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''

        Code:
        ******************* Session Start (Version 8.0.11.1) *******************
        2018-01-07 13:10:22:705 InstallDir='C:\Program Files (x86)\NinjaTrader 8\'
        2018-01-07 13:10:22:705 UserDataDir='C:\Users\ninja2015\Documents\NinjaTrader 8\'
        2018-01-07 13:10:22:705 MachineID=xxxx
        2018-01-07 13:10:22:705 OS='Microsoft Windows NT 6.1.7601 Service Pack 1'/'Win32NT'
        2018-01-07 13:10:22:705 OSLanguage='en-US'
        2018-01-07 13:10:22:705 OSEnvironment='64bit'
        2018-01-07 13:10:22:705 Processors=8
        2018-01-07 13:10:23:750 ProcessorSpeed=2.6 GHz
        2018-01-07 13:10:23:750 PhysicalMemory=16384 MB
        2018-01-07 13:10:23:797 DisplayAdapters=2/NVIDIA Quadro K2100M|Intel(R) HD Graphics 4600
        2018-01-07 13:10:23:797 Monitors=1/3840x2160
        2018-01-07 13:10:23:797 .NET/CLR Version='4.5'/64bit
        2018-01-07 13:10:23:797 SqlCeVersion='4.0.8482.1'
        2018-01-07 13:10:23:797 ApplicationTimezone=EST +0 hour(s)
        2018-01-07 13:10:23:797 ApplicationTimezone=UTC -5 hour(s)
        2018-01-07 13:10:23:797 LocalTimezone=EST +0 hour(s)
        2018-01-07 13:10:23:797 LocalTimezone=UTC -5 hour(s)
        2018-01-07 13:10:23:906 DirectXRenderingHW


        Code:
        2018-01-07 18:37:58:523 (Playback Connection) Cbi.Account.OnAddTrade: entryId='db2017dfe64745c8a45c1c2ec8b5b136' exitId='2c82d3c3c9b743d19783c31026a9bf7a' profitCurrencyBeforeCommissionAndFees=xxx
        2018-01-07 18:37:58:523 (Playback Connection) Cbi.Account.PositionUpdateCallback: instrument='ES ##-##' account='Playback101' avgPrice=0 quantity=0 marketPosition=Flat operation=Remove
        2018-01-07 18:37:58:528 *************** unhandled exception trapped ***************
        2018-01-07 18:37:58:528 Exception has been thrown by the target of an invocation.
        2018-01-07 18:37:58:534 (Playback Connection) Cbi.Account.AccountItemUpdateCallback: account='Playback101' accountItem=CashValue currency=UsDollar value=*****
        2018-01-07 18:37:58:535 (Playback Connection) Cbi.Account.AccountItemUpdateCallback: account='Playback101' accountItem=GrossRealizedProfitLoss currency=UsDollar value=*****
        2018-01-07 18:37:58:535 (Playback Connection) Cbi.Account.AccountItemUpdateCallback: account='Playback101' accountItem=RealizedProfitLoss currency=UsDollar value=*****
        2018-01-07 18:37:58:535 (Playback Connection) Cbi.Account.AccountItemUpdateCallback: account='Playback101' accountItem=RealizedProfitLoss currency=UsDollar value=*****
        2018-01-07 18:37:58:535 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException:[B] Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
           at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
        [/B]   at [B]System.Collections.Generic.List`1.CopyTo[/B](T[] array, Int32 arrayIndex)
           at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
           at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
           at [B]NinjaTrader.Gui.NinjaScript.StrategiesGrid.CalculateRealizedProfit[/B](StrategyBase strategy, Instrument instrument)
           at [B][SIZE="4"]NinjaTrader.Gui.NinjaScript.StrategiesGrid[/SIZE][/B].<[B]OnPositionUpdate[/B]>b__71_0(PositionEventArgs e)
           --- End of inner exception stack trace ---
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
           at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
           at System.Delegate.DynamicInvokeImpl(Object[] args)
           at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
        2018-01-07 18:38:25:589 (Playback Connection) Cbi.Account.CreateOrder: orderId='aa10836133404ee9a5eb45eff12db8aa' account='Playback101' name

        Comment


          #5
          Hello sledge,

          Thank you for your update.

          Can you send me your Log and Trace files for this event?

          You can do this by going to the Control Center-> Help-> Mail to Platform Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

          Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

          I look forward to your response.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Lumbeezl, 01-11-2022, 06:50 PM
          31 responses
          817 views
          1 like
          Last Post NinjaTrader_Adrian  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          5 responses
          14 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by swestendorf, Today, 11:14 AM
          2 responses
          6 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by Mupulen, Today, 11:26 AM
          0 responses
          7 views
          0 likes
          Last Post Mupulen
          by Mupulen
           
          Started by Sparkyboy, Today, 10:57 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X