• 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

Unhandled exception Value does not fall within the expected range.

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

    Unhandled exception Value does not fall within the expected range.

    Hello,

    I keep getting Unhandled exception Value does not fall within the expected range.
    Below is the Trace log file.

    Can you please help?

    2018-11-11 03:41:47:883 *************** unhandled exception trapped ***************
    2018-11-11 03:41:47:884 Value does not fall within the expected range.
    2018-11-11 03:41:47:884 System.ArgumentException: Value does not fall within the expected range.
    at NinjaTrader.Gui.NinjaScript.StrategyAnalyzer.Strat egyAnalyzer.WindowProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.PublicHooksFilte rMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation( Object o)
    at System.Windows.Threading.ExceptionWrapper.Internal RealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatch When(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    2018-11-11 03:42:19:689 *************** unhandled exception trapped ***************

    #2
    Hello YakusaTrader,

    Does this error occur when testing the Sample MA CrossOver strategy that is included with NinjaTrader?

    Do you have any properties that have the default value set to a value outside of the range set for the property?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      No I don’t have any property that is outside the default range.
      It happens when I switch charts and it’s annoying, and only in one computer (I have the same strategy running in a different computer, and it runs fine without any issue).
      I completely removed NT8 from the affected computer (I deleted the NT folder in my documents) and imported only one strategy, and it’s happening again.
      Both computers are updated to the latest NT 8, and windows 10.

      Comment


        #4
        Hello YakusaTrader,

        I was not able to confirm, does this error occur when testing the Sample MA CrossOver strategy that is included with NinjaTrader?

        When you mention 'switch charts', are you referring to running a different backtest in the Strategy Analyzer? (The error is coming from the Strategy Analyzer window)
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          It happens all the time, as long as I have the strategy analyzer window open. It occurs when I have the strategy analyzer open, and I start switching windows (from Chart to chart or from chart to the analyzer, and no matter what strategy is selected / highlighted on the strategy window -- it happens with Sample MA CrossOver strategy as well when highlighted selected on strategy analyzer).
          I don't get this error anymore when I close the strategy analyzer window.
          I removed all the scripts I created, and I only left the default scripts that come in NT8, and I still get the same behavior when the strategy analyzer is open.

          Comment


            #6
            Hello YakusaTrader,

            Thank you for confirming that the behavior can be reproduced with the SampleMACrossOver included with NinjaTrader. This tells us where to look for issues.

            Please ensure you are on 8.0.16.3 and run the repair from the NinjaTrader installer to replace any system files that may be corrupted with original versions.

            This will not remove your settings.
            1. Shutdown NinjaTrader
            2. Download the NinjaTrader installation package from the link below
            3. http://ninjatrader.com/GetStarted
            4. Run the repair from this (if the repair is unsuccessful, uninstall and then re-install NinjaTrader)

            If the error message still appears after the repair, please send an email to platformsupport [at] ninjatrader [dot] com so that we may schedule a call to assist. In the email please include a link to this forum thread.
            Last edited by NinjaTrader_ChelseaB; 11-13-2018, 07:47 AM.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Repairing and Uninstalling - Reinstalling NT8 didn't fix the problem. I was able to tempororly fix the problem by completely removing the NT folder from My Documents and reinstalling it again.
              The problem reoccured when I imported my strategies.
              I am not sure but I suspect strategy templates that corrupt NT system files.
              I don't know if there is a way to duplicate / copy templates from strategy 1 to strategy 2, when both strategies are similar (strategy 2 is a copy of strategy 1, but has fewer modifications), but I usually go to the template > strategy folder, and I just copy and paste, then I edit the XML file to rename all "strategy 1" to "strategy 2". Sometimes I see error in the log / output window.
              Is there a better way to copy duplicate strategy templates ?

              Comment


                #8
                YakusaTrader,

                I wouldn't be expecting an issue with a template for a different strategy to be causing issues when testing the SampleMACrossOver script included with NinjaTrader.

                Templates should be copied from inside of NinjaTrader and should be specific to the script. Templates should not be copied for different scripts. Load the script, load the template to load its settings, make any changes you would like, save a new template with a new name.

                I would like to schedule a call so that you may demonstrate the error occurs when testing the SampleMACrossOver included with NinjaTrader. Please send an email to platformsupport [at] ninjatrader [dot] com so that we may schedule a call to assist. In the email please include a link to this forum thread.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Ok, I am out traveling now, I'll do by the end of the week.

                  Comment


                    #10
                    Hello,

                    Sorry about this delay - I just came back from my traveling.
                    So now, I was able to investigate more, and I think it's computer related problem. I uninstalled NT8, then I deleted the NinjaTrader folder from "My Documents", after that I installed NT8 latest version "8.16.3". Then all I did was entering the FXCM credentials.
                    When I was connected, I opened a "EURUSD" chart, and then "Strategy Analyzer", then I got the same error. So basically it's a fresh NT8 install, with no script / strategy in it, besides the 4 strategies that come with the software.
                    Again I keep getting the same error when I switch between charts, and if the "Strategy Analyzer" window is opened (the default "Sample ATM Strategy" is highlighted).
                    I attached a picture FYI.
                    I think my computer might have some system files that are corrupted.
                    Is there any Windows 10 files used by NT8, besides the "My Documents" Folder, that I can remove / update to fix this problem?
                    Attached Files

                    Comment


                      #11
                      Hello YakusaTrader,

                      Thank you for your response.

                      NinjaTrader utilizes Windows .NET files and this could point to a matter concerning file access or files.

                      Please send me your log and trace files so that I may look into what occurred.

                      You can do this by going to the Control Center-> Help-> Email 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.
                      Patrick H.NinjaTrader Customer Service

                      Comment


                        #12
                        I just did.
                        Let me know if you need anything else.

                        Thanks a lot.

                        Comment


                          #13
                          I think I was able to fix the problem by repairing Framework 4.7.3.
                          I'll let you know if the error still occurs.

                          Thank you.

                          Comment


                            #14
                            Update - I was able to restore my saved backup, and still no error. It looks like the problem has been fixed.

                            Comment


                              #15
                              Hello YakusaTrader,

                              Thank you for the update on this matter.

                              Please let us know if we may be of further assistance.
                              Patrick H.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by simonkloot, Today, 04:14 AM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_ChrisSch  
                              Started by percma, Today, 02:00 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post percma
                              by percma
                               
                              Started by antrux, Yesterday, 06:26 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post antrux
                              by antrux
                               
                              Started by kevinenergy, Yesterday, 03:34 PM
                              0 responses
                              16 views
                              0 likes
                              Last Post kevinenergy  
                              Started by Bidder, Yesterday, 01:50 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Working...
                              X