Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8B8 - System.Reflection.TargetInvocationException

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

    #16
    Different results and more errors than before?!
    ***I may have been too late enabling the strategy. Anyways, I restarted Playback-MR, and started editing this message - and already have thrown an exception... so this might have more than the previous run...

    Last edited by sledge; 03-20-2016, 08:56 PM.

    Comment


      #17
      I guess this is about the same # of errors. I did not count - but the result is the same, so maybe I missed day1 because my laptop is so fast after hitting play on MAX.. so not too much of a concern on that.



      Comment


        #18
        Rebooting my Win7 64 bit pro, didn't help


        Comment


          #19
          I've modified this strategy... and since I've backed off "40" enters on initial (10), and tightened up the stop loss - there are less errors...

          and I notice on the charts - there are LESS 1's and 2's being filled with enforce immediate fills...

          when this thing starts breaking everything out in it starts throwing these exceptions.

          **my data is imported from NT7
          **if I remove the ADD - no exceptions
          ***this happens a lot in my real strategy so if you think I'm playing I'm not.. I want this issue solved so I don't waste anymore of my time (over 5 hours tonight) or your time

          Comment


            #20
            Hello,

            I reviewed the posts.

            As I stated, the use of Instrument in the starting States would not be suggested per the help guide, it should only be used after DataLoaded: http://ninjatrader.com/support/helpG...instrument.htm

            Warning: The properties in this class should NOT be accessed within the OnStateChange() method before the State has reached State.DataLoaded
            This document still needs changed to the correct object or Instrument instead of Instruments , the Instrument object is shown on the page above.

            I would expect the strategy to not perform correctly based on the help guide note and use of Instrument in State.Configure. This part I do expect to happen in your sample as you would need to use a String and not the string property Instrument.FullName in the State.Configure.

            I do not expect it to throw and exception, so I will look further into that on my end, you do not need to post further on that portion of the sample.

            Have you created a sample that does not use Instrument.FullName at all and instead uses hard coded values that still reproduces the problem? If so I would like a copy of that sample and the specific instructions to further test regarding the orders being a part of this. I was unable to reproduce the problem while using valid contract month input (strings) instead of Instrument.FullName.


            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #21
              As I stated below, I removed the name completely.

              The problem is using any AddDataSeries and multiple contracts that get filled in small amounts.


              If I don't have the AddDataSeries, there is no exception.

              I'll post tonight that version.

              Comment


                #22
                Hello,

                Thank you for the reply.

                If I don't have the AddDataSeries, there is no exception.
                If there is no exception after removing the AddDataSeries, it would seem this resolves the initial concern so there would be no need to post another sample if it is working now.

                I had only asked for an additional sample in the case there are still exceptions or some other problem while using hard coded or correct syntax with AddDataSeries.

                I will review the Instrument.FullName exception on my end as that sample is very straight forward and I already have it.

                In the case there are other issues outside of what has been described please let me know, otherwise this will be reported and can be marked resolved.

                Please let me know if I may be of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #23
                  Originally posted by NinjaTrader_Jesse View Post
                  Hello,

                  Thank you for the reply.



                  If there is no exception after removing the AddDataSeries, it would seem this resolves the initial concern so there would be no need to post another sample if it is working now.

                  I had only asked for an additional sample in the case there are still exceptions or some other problem while using hard coded or correct syntax with AddDataSeries.
                  Honestly - this is NOT WORKING.

                  It's ANY AddDataSeries. I'm trying to add ^VIX and use it in my strategy, I have reproduced it with just plain AddDataSeries. Your SOFTWARE KEEPS BLOWING UP with EXCEPTIONS ALL OVER THE SCREEN.


                  I will review the Instrument.FullName exception on my end as that sample is very straight forward and I already have it.
                  It works for me. FIX THE SOFTWARE THEN.


                  In the case there are other issues outside of what has been described please let me know, otherwise this will be reported and can be marked resolved.

                  Please let me know if I may be of further assistance.

                  NOTHING HAS BEEN RESOLVED.

                  I've about had it. This is wasting my time.

                  All 5 of my systems do this on my MAIN STRATEGY and my SAMPLE that I'm trying to get through to you all there.

                  BUT THIS IS NOT WORKING .
                  Attached Files

                  Comment


                    #24
                    Originally posted by sledge View Post
                    I changed the code as I mentioned a little earlier.

                    I used a different skin (Slate Dark), a different machine.

                    I thought I was in the clear as I made it almost 1.5 months before throwing 10 errors in the remaining 1.5 months.




                    Starting on 12/15/2015 will result in some nice profits and allow the whole contract to play out.

                    Starting on 12/14/2015 will result in bankruptcy.
                    Just one day between fortune and ruin!?

                    Comment


                      #25
                      Same thing in Beta 10.


                      Start on 12/15/2015 for ES 03-16.

                      Use this Strategy attached. Attach it to a chart. 15 seconds. (this probably shouldn't matter) (Additional Test: 3 minute chart only produce 4 such errors, and different result, $123,xxx)



                      Code:
                      2016-03-22 20:24:48:073 (Playback Connection) Cbi.Account.AccountItemCallback: account='Playback101' accountItem=RealizedProfitLoss currency=UsDollar value=*****
                      2016-03-22 20:24:48:077 *************** unhandled exception trapped ***************
                      2016-03-22 20:24:48:077 Exception has been thrown by the target of an invocation.
                      2016-03-22 20:24:48:080 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
                         at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
                         at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
                         at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
                         at NinjaTrader.Gui.NinjaScript.StrategiesGrid.CalculateRealizedProfit(StrategyBase strategy, Instrument instrument)
                         at NinjaTrader.Gui.NinjaScript.StrategiesGrid.<OnPositionUpdate>b__66_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)
                      Attached Files
                      Last edited by sledge; 03-22-2016, 07:39 PM. Reason: Additional test.

                      Comment


                        #26
                        without restarting NT (only disconnect replay/reconnect) - I did test 3 minute bars and got less exceptions. (I also turned on chart trader hidden and global cross hairs). I got like 6 exceptions. $124k. (and had a new ^vix 3 minute chart).

                        I restarted replay (disconnect replay/reconnect) ) changed to 5 second chart - expecting more. Down to 4 exceptions or something. with ^VIX chart.

                        I restarted replay (disconnect replay/reconnect) . Changed back to 15 second chart. with ^VIX chart.

                        I restarted NT8B10 and only 15 second chart - and got another ?30? exceptions.

                        I then got sidetracked with the PAUSE bug/crash.

                        Comment


                          #27
                          Originally posted by koganam View Post
                          Just one day between fortune and ruin!?
                          Yes - the coin flip strategy is definitely dangerous.

                          Do you see any exceptions with my strategy on ES 03-16 and making mega $$$ with correct start date of 12/15? Your VM's might not take the same path - and not have any exceptions.

                          At least run 2 or 3 times...

                          Hopefully with data imported from NT7...?

                          Comment


                            #28
                            Sledge,

                            Apologies for the delay on this issue. The issue was not reproducible for the longest time and is now reproducible enough for us to look into. Wanted to give you an update that this was not forgotten. I will get back when I have more information.

                            Comment


                              #29
                              Hello sledge,

                              This behavior is being resolved in #9612. The fix should be available for Beta 11.

                              Please let us know if we may be of further assistance anytime.
                              Last edited by NinjaTrader_MichaelM; 04-01-2016, 07:22 AM.
                              Michael M.NinjaTrader Quality Assurance

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by pmachiraju, 11-01-2023, 04:46 AM
                              8 responses
                              147 views
                              0 likes
                              Last Post rehmans
                              by rehmans
                               
                              Started by mattbsea, Today, 05:44 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post mattbsea  
                              Started by RideMe, 04-07-2024, 04:54 PM
                              6 responses
                              33 views
                              0 likes
                              Last Post RideMe
                              by RideMe
                               
                              Started by tkaboris, Today, 05:13 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post tkaboris  
                              Started by GussJ, 03-04-2020, 03:11 PM
                              16 responses
                              3,282 views
                              0 likes
                              Last Post Leafcutter  
                              Working...
                              X