Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom DLL

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

    Custom DLL

    Dear sirs,
    I'm using 6.5.1000.16 released.
    I create a simple DLL with VS2008 SP1 Framework 2.0 witch contain a dimple public class:

    namespace cl
    {
    public class clTest
    {
    public clTest()
    {
    }
    }
    }

    After I add the dll to the reference.
    I a new strategy I wrote :

    using cl;

    cl.clTest objTest;

    protected override void Initialize()
    {
    try
    {
    Print("Initialize 1");
    objTest= new cl.clTest() ;
    Print("Initialize 2");
    }
    catch(Exception ex)
    {
    System.Windows.Forms.MessageBox.Show(ex.Message);
    }
    }

    in the ouptot I can't see "Initialize 1" and "Initialize 2", but if I comment objTest= new cl.clTest() ; I will see the strings..why?where is the problem?
    Thank you

    #2
    Your test demonstrates there's issues instantiating your object.

    Make sure you've added a reference to the dll through the Right Click > References window and check the log tab for any error messages encountered when running the script.

    Unfortunately this is beyond the scope of support we provide but hopefully another community member with experience in this area can offer input.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi RyanM,
      after closed and reopened Ninja all work..
      One question: If I would divulgate our strategy, I need to put our logic in a substrate software compiled. Can you explain me the best way?
      Can we create a dll that is based of the Strategy class and call/use every property and method? Is it possible intercept onBarsUpdate and onOrdersUpdate in the assembly?
      Thank you for your support

      Comment


        #4
        Originally posted by simone View Post
        One question: If I would divulgate our strategy, I need to put our logic in a substrate software compiled. Can you explain me the best way?
        I read the help and I found NinjaTrader.Custom.dll that the solves all my questions ..
        Sincerely

        Comment


          #5
          Glad to hear. Thanks for the update, simone.
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          627 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          359 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          562 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          567 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X