Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Import my own .dll library for custom NinjaScript

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

    Import my own .dll library for custom NinjaScript

    Hello,

    i have my own .dll library what I wrote and I would like to use that for my custom ninjascript.
    Could you please adivce me where I have to copy the library (to which NinjaTrader folder) to make it working?

    I tried to copy my .dll to ...\NinjaTrader 6.5\bin\Custom
    and the library was visible in the "Remove NinjaScript Assembly" window,
    but i couldn't use

    Code:
    ...
    using MyOwnNameSpaceFromMyDLLFile;
    ...
    ...
       MyClassFromMyNamespace.myStaticMethod()...
    you understand.. i couldnt use it in my custom NinjaScript code because Ninja doesnt recognize the MyOwnNameSpaceFromMyDLLFile namespace.


    So what should I do if I want to use my .dll with my classes and methods in any custom NinjaScript strategy?

    Thank you

    #2
    Hello Zooinek,

    The location of your file is OK. You will also have to add a reference to the file.

    From within a NinjaScript compiler Right Click and select References. Click Add and then browse to the location of your file.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your very quick response

      And it is possible to do it somehow via any API?
      I mean it is possible to do it programmatically?

      Because every my product what I offer to visitors of my website need this library.
      So I will create any install program wchich will find (I guess via Windows registry) location of NinjaTrader folder, copy the file, and add the reference?

      So Could you advice me something please, how to add the reference to NinjaTrader somehow programmaticaly? For example add any special row to the any config.cfg file or something which is possible to do via my custom library installer..
      Something what is possible to do programmatically

      Thank you
      Last edited by zooinek; 04-15-2010, 09:34 AM.

      Comment


        #4
        Your installer can be configured to place the dlls in the right directory. Unfortunately it is not possible to add references programatically. Your customers will have to do this step.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          use my own .dll library for custom NinjaScrip

          Hello,
          I have my own .dll maked in visual studio. I have added reference in ninjascript (via context menu and using ) and moved my .dll to \NinjaTrader 7\bin\Custom but from ninjascript I can't use it.
          Could you help me..
          Thank you

          Comment


            #6
            Welcome to our forums - did you restart NT after those steps so it could be loaded at startup?

            Comment


              #7
              Thank you Bertrand
              restart helped.

              I have another problem. I'm testing my strategy. I need serialize object in the end of backtest. Is there some event in ninjascript? I have tried OnTermination() but it isn't what I need.
              Thank you

              Thank you

              Comment


                #8
                Great - there's unfortunately no property supported for this task, if you know how many bars you test you could work with those to trigger serialization a few bars before the end of the testing.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                657 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                373 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
                579 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X