Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 Scripting Error

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

    NT7 Scripting Error

    Hi

    I am trying to construct a very simple strategy, but when I use the wizard, as I complete the strategy and attempt to save it, the code of my strategy opens up showing errors in ninja script files that have nothing whatsoever to do with what I have constructed.

    To be honest, when I open the wizard, there is an error message 'Unable to retrieve type intos from assembly blah blah' It relates to System.Reflection.ReflectionTypeLoadException. Why would I get this error on just starting the wizard?

    Quite simply, all I did once in the strategy wizard was to name my strategy then click next, in Conditions + Actions, I set
    HMA(40)[0]>HMA(40)[1] with the actions being ExitShort first and then EnterLong. The reverse for when HMA is <. I added both actions in the 1 box. Is that OK, or could that cause issues?

    When I got to the compile step, the code file opened saying "error generating strategy". There were 4 errors, all of them relating to a Ninja Script files that have nothing to do with this new strategy.

    The error says code CS1729 and then 'NinjaTrader.Data.Period' does not contain a constructor that takes '2' arguments. The Ninja Script files it mentions are all part of the CMIPivotsDailyV86.cs (including Monthly, Weekly etc). I have never entered anything whatsoever to do with this Pivot indicator, so why is NT generating an error in my newly created script file? The only indicator I am attempting to use in this strategy is NTs native HMA in NT7.

    Any help gladly accepted.

    cheers

    #2
    honkin, the way it works is all scripts need to be 100% error free and compilable as all of them are compiled in one assembly file to used at runtime when working with the indicators and strategies - thus you need to debug or delete the script that would give the compile error now, even if that script is not related in any way to the one you're working on finishing - http://www.ninjatrader.com/support/f...ead.php?t=4678

    Comment


      #3
      I have just reinstalled NT7 v 7.0.1000.2 and get the error message as the attached when I try and import a script for the first time. I've got to the stage of finding the errors which reference Jurik and Woodies but have no idea what these are and cannot find any thread where they have been resolved. Please could you advise.
      Attached Files

      Comment


        #4
        Welcome to our forums here David - please right click in any indicator code and select References > Add form the dropdown menu. Then ensure the NinjaTrader.Vendor.Dll is on the list of references, if not readd it from the MyDocuments\NinjaTrader 7\bin\Custom folder and afterwards recompile your scripts again by pressing F5 in the editor.

        Comment


          #5
          Thanks Bertrand. I've checked and both Ninja Trader.Custom and .Vendor are in the bin file with a .dll extension but when I press F5 key in the Indicator editor I get the same message saying "Error generating Indicator".

          Comment


            #6
            Thanks David, but are they also in the list references of the NinjaScript editor?



            If they are listed and you still get the error, please remove them from the list of references and readd then fresh.

            Comment


              #7
              Ok I see what you mean. I've added them and now seems to work. Thanks for your help.

              Comment


                #8
                Glad to hear this step resolved the issue for you.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                650 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                370 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                109 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                574 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                577 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X