Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Import blocked because of ninjascript programming errors

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

    Import blocked because of ninjascript programming errors

    when trying to import, the following message popped up

    Click image for larger version

Name:	jan05.jpg
Views:	1
Size:	29.2 KB
ID:	906855

    what should i do to resolve the issue?

    #2
    Hello joemiller,

    Please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.



    For NinjaTrader 8:
    1. Open NinjaTrader
    2. From the Control Center select the New menu--> select NinjaScript Editor
    3. Right click in the window and select Compile to compile all NinjaScript objects
    4. At the bottom of the NinjaScript Editor window a new section will appear where you can find the error locations
    5. You can exclude the file referenced in the editor by double clicking on the appropriate object type on the right of the NinjaScript Editor window. This will expand the object type folder. You can then select the file with a left click--> right click on the object--> then select Open to begin debugging the file, Exclude From Compilation, or Remove to delete the file.



    If you are unsure as to what the error is indicating, please send me a screenshot of the NinjaScript File column and Error column fully visible (not to be confused with the Code column)

    To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

    Click here for instructions

    Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

    Click here for detailed instruction

    We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip on our forums - http://www.ninjatrader.com/support/f...ead.php?t=4678

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

    Comment


      #3
      thank you jesse,

      that worked just fine and the strategy has been successfully imported. i now want to modify it in the strategy builder but have been unable to do so. it has never been intentionally unlocked. can i determine somehow whether it is locked or not?

      i am able to access it in strategy analyzer but not in the editor or the strategy builder?
      it is my strategy and i have never intentionally marked it to be ''private'' or ''read only'' or any such kind of blocking concept.

      please advise me what to do.

      Comment


        #4
        Hello joemiller,

        How was this strategy exported? This sounds like the strategy is in a protected format.

        One way to know would be to double click on the zip file you imported to view the files. Are the files inside only .cs files or are there .dll files?

        If you have another version you can edit on another pc or the source, you would need to export the script as source code and ensure it is not set to compiled assembly or protected.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          I had sent it to a consultant to modify it and he sent back two versions [i.e.] compiled zip and un-compiled zip. i used the compiled zip. maybe i should have used the un-compiled zip? the attachment shows both after having been double clicked on as you suggested to do.

          Click image for larger version

Name:	xxxxJAN05.jpg
Views:	1
Size:	424.3 KB
ID:	881626

          Comment


            #6
            Hello joemiller,

            Yes you would need to remove the Compiled version you imported using the Tools -> Remove Ninjacript Assembly menu. Next re import the uncompiled version, the non compiled version would be the source code.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello joemiller,

              Yes you would need to remove the Compiled version you imported using the Tools -> Remove Ninjacript Assembly menu. Next re import the uncompiled version, the non compiled version would be the source code.

              I look forward to being of further assistance.
              hi jesse,
              i did as suggested/directed and everything went smoothly, but nothing has changed [i.e.] i am still able to access the strategy in the strategy analyzer but not in the strategy builder?

              Comment


                #8
                Hello joemiller,

                Was the NinjaScript editor window open when you had imported the file? If so have you tried closing it and re opening it? Also have you tried restarting the platform? If you are certain the source code is imported but it is not showing up, this may have to do with the names of the files/classes. You could view the code in a text editor outside of NinjaTrader to get an idea of the names used to see if that is the case. This could also be template related in case you had previously saved a template with a changed name.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Re: '' If you are certain the source code is imported but it is not showing up ''

                  yes, i'm pretty certain because it shows up in the strategy analyzer [but not in the strategy builder]....unless of course it is the old version.... except that in that case it seem like it would show in the builder like it always did?

                  Comment


                    #10
                    Hello,

                    To know the source is specifically installed, using the Analyzer or other tools like the Strategies menu is not a good way to find out. Also if the developer unlocked the strategy it would not be in the builder but would be in the NinjaScript editor.

                    You could instead Instead go into the NinjaScript editor, expand the Strategies section and see if the strategy is listed.

                    Alternatively you can check if the compiled or protected version is installed by using the Tools -> Remove Ninjacript Assembly menu.

                    Alternatively you can review what files are inside the Strategy folder inside of the zip that contains the source code, then look in the folder Documents\NinjaTrader 8\bin\Custom\Strategies, are the files from the zip inside of this folder?

                    I look forward to being of further assistance.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      How to find which strategy doesn't compile

                      follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC.

                      For NinjaTrader 8:
                      Open NinjaTrader
                      From the Control Center select the New menu--> select NinjaScript Editor
                      Right click in the window and select Compile to compile all NinjaScript objects
                      At the bottom of the NinjaScript Editor window a new section will appear where you can find the error locations
                      You can exclude the file referenced in the editor by double clicking on the appropriate object type on the right of the NinjaScript Editor window. This will expand the object type folder. You can then select the file with a left click--> right click on the object--> then select Open to begin debugging the file, Exclude From Compilation, or Remove to delete the file.

                      Comment


                        #12
                        Hello,

                        I wanted to check, is some portion of this instruction not working or what was the specific questions surrounding it?

                        I noted the subject of your post being "How to find which strategy doesn't compile", are you seeing some errors? If so could you provide them for me to see as well? The file in error would be listed in the errors under the "NinjaScript File" column.

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

                        Comment


                          #13
                          thanks for checking. however everything is fine ... problem resolved. the instructions in post #11 worked quickly and smoothly to identify the offending strategy.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by funk10101, Today, 12:02 AM
                          1 response
                          10 views
                          0 likes
                          Last Post NinjaTrader_LuisH  
                          Started by GLFX005, Today, 03:23 AM
                          1 response
                          6 views
                          0 likes
                          Last Post NinjaTrader_Erick  
                          Started by nandhumca, Yesterday, 03:41 PM
                          1 response
                          12 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Started by The_Sec, Yesterday, 03:37 PM
                          1 response
                          11 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Started by vecnopus, Today, 06:15 AM
                          0 responses
                          1 view
                          0 likes
                          Last Post vecnopus  
                          Working...
                          X