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 error with strategy + indicator

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

    import error with strategy + indicator

    I am distributing an indicator and a strategy that depends on that indicator. I export the pair as compiled assemblies. When I import them, I am getting a message that:

    Import failed: The NinjaScript Archive file may contain duplicate method names that already exist on your PC or there is a required file missing on either your PC or in the import archive.

    I've checked that the indicator/strategy do not exist on the PC. I can copy the source files and compile them just fine on that same PC.

    Any ideas why this might be happening?

    Onn

    #2
    Hi Onn, on the exporting PC are there more assemblies referenced than just the default NT setup ones?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Not sure what you are asking but let me try and answer. I have an indicator that I created. It only makes use of the default built in NT indicators.

      I have a strategy that references that Indicator. I export both of these in one archive.

      On the exporting PC, I do have other non-default assemblies but they are not referenced in the indicator or strategy

      does this answer your question?

      Comment


        #4
        Hello,

        I would suggest manually importing the DLL on the destination computer and manually adding the reference to this DLL, then compile your indicators.

        This will tell us exactly where the conflict is coming from and help you determine how to avoid this.

        You can do this by extracing the DLL files you created and moving to (My)Documents\NinjaTrader 7\bin\Custom

        Once they are in this folder, please right click on the NinjaScript editor and select "References" and then select "Add" and then locate the DLL files you are using.

        After this has been completed, please compile your indicators and the error should tell us exactly where the conflict is coming from.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Matthew,
          I also ran into similar issue with my new pc. I exported as compiled assembly and imported it and no problem but when I went in to edit my strategy and indicators I donot see them in the list. I even tried to load the existing strategy and added the dll and compiled it again but donot see my custom indicators and strategy (source code). but they are running in MA and even enable strategy in the chart. what am I missing

          Comment


            #6
            Could it be that they have a different name than the DLL file?
            MatthewNinjaTrader Product Management

            Comment


              #7
              yes. how do I get em back ? When we compile different indicators into an assembly how do we name same ?. please help... spent hours developing and now I din;t see the source code..

              Comment


                #8
                Sorry Matthew, such an ignorent i am. Golden rule " read the manual" ignored and assumed that assembly is "zip" of all indicators. After looking thru some of the posts i realized what a blunder i commited. Now, is there a way to get the code back from assembly. Please please help....
                hours of work and my system crashed yesterday and this is the last backup i have. Fingers crossed

                Comment


                  #9
                  Originally posted by kinshin9 View Post
                  Matthew,
                  I also ran into similar issue with my new pc. I exported as compiled assembly and imported it and no problem but when I went in to edit my strategy and indicators I donot see them in the list. I even tried to load the existing strategy and added the dll and compiled it again but donot see my custom indicators and strategy (source code). but they are running in MA and even enable strategy in the chart. what am I missing
                  Dll is not source code. If you import an indicator/strategy as a dll, you will not be able to edit it.

                  Comment


                    #10
                    Originally posted by kinshin9 View Post
                    Sorry Matthew, such an ignorent i am. Golden rule " read the manual" ignored and assumed that assembly is "zip" of all indicators. After looking thru some of the posts i realized what a blunder i commited. Now, is there a way to get the code back from assembly. Please please help....
                    hours of work and my system crashed yesterday and this is the last backup i have. Fingers crossed
                    Unfortunately you will need to find the original source file (.cs) in which the DLL was created from and make these changes there. Once changed, you can reexport as a DLL.
                    MatthewNinjaTrader Product Management

                    Comment


                      #11
                      more info on import issue

                      Hi Mathew,

                      I did as you suggested below and got the following error:

                      NinjaScript File: Indicator\@ADL.cs
                      Error: The Type NinjaTrader.Indicator.MyIndicator is define
                      Line: 18
                      Column: 11

                      Ideas?



                      Originally posted by NinjaTrader_Matthew View Post
                      Hello,

                      I would suggest manually importing the DLL on the destination computer and manually adding the reference to this DLL, then compile your indicators.

                      This will tell us exactly where the conflict is coming from and help you determine how to avoid this.

                      You can do this by extracing the DLL files you created and moving to (My)Documents\NinjaTrader 7\bin\Custom

                      Once they are in this folder, please right click on the NinjaScript editor and select "References" and then select "Add" and then locate the DLL files you are using.

                      After this has been completed, please compile your indicators and the error should tell us exactly where the conflict is coming from.

                      Comment


                        #12
                        Hello onnb1,
                        Thanks for your note and I am replying for Matthew,

                        Can you please send a screenshot to support[AT]ninjatrader[DOT]com depicting the scenario.

                        Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

                        I look forward to assisting you further.
                        JoydeepNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Rogers101, 05-05-2024, 11:30 AM
                        16 responses
                        49 views
                        0 likes
                        Last Post Rogers101  
                        Started by ninza33, Today, 12:31 PM
                        2 responses
                        9 views
                        0 likes
                        Last Post ninza33
                        by ninza33
                         
                        Started by Bobin, 03-12-2024, 08:51 AM
                        15 responses
                        481 views
                        0 likes
                        Last Post fiddich
                        by fiddich
                         
                        Started by Skifree, Today, 11:21 AM
                        4 responses
                        14 views
                        0 likes
                        Last Post Skifree
                        by Skifree
                         
                        Started by Bogdan097, Today, 03:25 PM
                        0 responses
                        8 views
                        0 likes
                        Last Post Bogdan097  
                        Working...
                        X