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

How to reference System.Data.dll in Ninjascript?

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

    How to reference System.Data.dll in Ninjascript?

    Hello Everybody:

    I am using System.Data.dll file in one of my strategies. I have added the reference by right-clicking and selecting references to System.Data.dll file located in Windows --> Microsoft.Net --> Framework --> v2.0.50727

    Strategy is working fine and everything is working as expected. I had issues when exporting the strategy. I have included the file "AdditionalReferences" with text "System.Data" at the root level of the exported zip file and have also added the System.Data.dll at the root level of the zip file.

    When I import the file on another computer, Ninjatrader do not reference the System.Data.dll and failed to import the strategy.

    Please guide what is the appropriate procedure to reference System.Data.dll.

    Thank you

    #2
    sherazwaqar, the process seems valid - which exact error on import on the other machine do you get thrown? Are moving from a 64 bit setup to a 64 bit setup or otherwise?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Please see the error messages when importing the strategy. I am developing on a 32 bit windows 7 and trying to import the strategy into 64 bit windows system.

      Comment


        #4
        sherazwaqar, I would expect the outcome when moving to 64 bit from this setup, if you add the 64 bit specific dll into the file would the issue persist (i.e. from this folder C:\Windows\Microsoft.NET\Framework64\v2.0.50727)?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          sherazwaqar, I would expect the outcome when moving to 64 bit from this setup, if you add the 64 bit specific dll into the file would the issue persist (i.e. from this folder C:\Windows\Microsoft.NET\Framework64\v2.0.50727)?
          Did the above and received the following message.

          Comment


            #6
            sherazwaqar, thanks. Is there any other 3rd party assembly referenced on the machine you export from? To find out which duplicate it finds offense at, I would suggest to manually install the dll in the bin > custom folder on your target machine, restart NT and recompile.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              I do not have any other dlls referenced in the strategy other than System.Data.dll. I am developing it for commercial purposes and would like to know how should I include 32bit and 64 bit versions of the System.Data.dll file so users should have no issues importing it.

              Thank you

              Comment


                #8
                I was not talking about this specific strategy, but the environment you export from in general. There should be no other references than the NT default ones and your explicitly needed one here.

                Generally you would then have two versions ship, one for 32 and another for 64 bit.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  This is what I have in installed assemblies.

                  Comment


                    #10
                    Thanks, would still need to be understood what exactly is causing the duplicate message in this case -

                    'To find out which duplicate it finds offense at, I would suggest to manually install the dll in the bin > custom folder on your target machine, restart NT and recompile.'
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      I am able to make the strategy work on other computers. Its still in testing phase so I do not have a dll file yet. I can copy the strategy .cs file to Strategy Folder and open in Ninjascript editor and reference the assembly System.Data.dll and it works fine.

                      Please let me know, when I reference the dll from my development machine should I should reference it from windows-->microsoft.net--> Framework (adjust the path for 64 bit machine) or should I copy the dll in Custom folder and reference it in strategy from their.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Brevo, Today, 01:45 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post Brevo
                      by Brevo
                       
                      Started by aussugardefender, Today, 01:07 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post aussugardefender  
                      Started by pvincent, 06-23-2022, 12:53 PM
                      14 responses
                      242 views
                      0 likes
                      Last Post Nyman
                      by Nyman
                       
                      Started by TraderG23, 12-08-2023, 07:56 AM
                      9 responses
                      384 views
                      1 like
                      Last Post Gavini
                      by Gavini
                       
                      Started by oviejo, Today, 12:28 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post oviejo
                      by oviejo
                       
                      Working...
                      X