Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exporting a strategy

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

    Exporting a strategy

    Hi,

    I have exported a strategy and sent it to a friend who also uses NinjaTrader. When he tries to import it, he gets an error message saying you may have duplicate method names or a required file may be missing - i.e. zero (0) help.

    He contacted support but they were no help (contact the vendor, we didn't do it, we weren't even there); does anyone have any idea what this is about and how to fix it?

    I do not want to distribute the source code for any number of reasons. In the export, there are no options at all and therefore I find it hard to understand what either one of us could do about the error.

    #2
    Hello ScottB,

    There is likely another file that uses the same names as your strategy. This could be a custom method, class or enum. All these must be unique per namespace.

    In order to import, you have to identify which file has the duplicate items and delete prior to import.

    If you are importing a newer version of your assembly over the top of your existing assembly, have him delete the prior version first: File > Utilities > Remove NinjaScript Assembly.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan,

      Thanks that is a simple answer I can work with. I appreciate it. I am assuming that the @EMA, etc. system names wouldn't be included in that list.

      Scott

      Comment


        #4
        Right - you won't have issues with the system indicators. Most likely it's a custom method or enum that already exists in his platform. If you previously gave him source code then this would likely contribute.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Good deal; thanks for the help. A lot was getting lost in the translation from support to him to me. It is probably an enum.

          Scott

          Comment


            #6
            Hi,

            I thought I might be able to find the issue based on Ryan's earlier answer but I haven't been able to.

            I am exporting a strategy that uses one custom indicator and several standard NinjaTrader indicators (EMA, etc.) that is it. I have no options when I export the strategy so there is nothing I can do on my end and it compiles both with the source code (from the editor) and when exporting the assembly.

            When my friend tries to import the strategy he gets a message saying there might be a duplicate name or a file missing. He has checked all his indicators and also the actual directories and there are no duplicates; no enums, no duplicate indicators, no duplicate strategies, etc.

            I have no idea what to do and furthermore what if there he had one of the indicators the strategy uses, what would I do under those circumstances. We are trying to avoid a full re-install but are running out of options.

            One further piece of information. If I put the actual source code on his computer and compile it through the editor, everything works fine.

            Any ideas?

            Best Regards,
            Scott

            Comment


              #7
              Scott, to clarify : are you getting any log error about export problems when doing so? In some cases the standard @ indicator's do need to be added manually to achieve an export -



              If the script compiles fine when manually imported, there's likely no duplicate conflict at play.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Bertrand,

                I am not getting any log errors (or any errors at all) on the export machine. I get a message that NinjaTrader will automatically export 1 custom strategy and 3 standard indicators (@...). I hit OK and all is good.

                It is on the other person's machine where the error shows up. When he tries to import the .zip file, he gets an immediate message saying there is likely a duplicate or missing file and that is it.

                This is what is confusing me. He has none of my stuff on his machine and I don't have any options on my end to add something or not export something.

                However, if I send him the source, he can create the strategy, compile it and run it just find. I would like to resolve this because obviously I don't want to send the source around and even if I did, handling versions would be a nightmare.

                Any help you can give will be appreciated.

                Best Regards,
                Scott

                Comment


                  #9
                  Scott, if you want pass the compiled assembly around we suggest you export from a clean NT setup with only the system indicators present - I can take a look if you send the files to my Attn at support at ninjatrader dot com.

                  Also : which duplicate method(s) are we talking about? If he installs the DLL manually and then compiles - what errors would the compiler then list?

                  Thanks,
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Bertrand,

                    I am not really following what you are saying. Do I need a NinjaTrader installation with only this one custom strategey (and the one custom indicator it uses) on the machine (or at least in that NinjaTrader strategy/indicator directory)?

                    I don't see that as practical so you must mean something else.

                    There have been two distinct efforts at getting this installed. First the standard import from a .zip file; that one failed as I mentioned.

                    Second, I gave him the actual source. He created a new strategy (with the same name as the one in the .zip file), unlocked the code, cut and pasted the source over the Wizard generated code, compiled it and all was good.

                    I just can't figure out what to do so I don't have to send him source. In reality, I don't seem to have any export options, so anything we do would have to be on his side.

                    Best Regards,
                    Scott

                    Comment


                      #11
                      Hello,

                      At this point for us to help with this to find out either A. There is a problem with the exported file and does not contain the added indicators it needs. or B. There is a problem on the customers PC and we will go from there.

                      Can you please send me the file that does not import on the customers PC to support at ninjatrader dot com so that we can attempt an import on our machine. Please reference this forum post.

                      I look forward to assisting you further.

                      Comment


                        #12
                        I just noticed Brett responded and not Bertrand. I sent the file to support at NinjaTrader but I put ATTN Bertrand in the subject line. If you need me to resend it, please let me know.

                        Best Regards,
                        Scott

                        Comment


                          #13
                          Hi Scott,

                          I just sent your message on to Brett - he should be following up with you shortly.
                          KyleNinjaTrader Customer Service

                          Comment


                            #14
                            Duplicate, then modify a strategy?

                            I want to be able to modify in NT 7 a strategy I created by modifying it slightly. I could do this with NT 6.5 by editing an existing strategy and changing the name of that strategy. It would preserve the original one and create a new one with the same criteria and allow me to modify some of the criteria, thus creating the new strategy. I can't see how to do that in NT 7. What am I missing?

                            Comment


                              #15
                              dj, I am pretty certain, you only have to right click on the open strategy and choose save as. For indicators I know NinjaTrader now handles all the changes within their part of the code.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by habeebft, Today, 07:27 AM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_ChristopherS  
                              Started by AveryFlynn, Today, 04:57 AM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Started by Max238, Today, 01:28 AM
                              4 responses
                              37 views
                              0 likes
                              Last Post Max238
                              by Max238
                               
                              Started by r68cervera, Today, 05:29 AM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by geddyisodin, Today, 05:20 AM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Working...
                              X