Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to find entry point (connecting to a dll)

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

    Unable to find entry point (connecting to a dll)

    Hi, I have created a very simple .dll and saved it on my computer as
    C:\ClientTraderConnectionClass.dll.

    The code used to create this class is:

    Code:
     namespace ClientTraderConnectionClass
    {
        public static class StopLosses
        {
            public static double GetTest()
            {
                return 10;
            }
        }
    }
    I want in indicator inside NinjaTrader to call the "ClientTraderConnectionClass.StopLosses.GetTes t()" function, but so far I'm not sure exactly how to do that. Here is the code I have in my indicator, which is throwing the error "Unable to find entry point "GetTest()"

    Code:
    public class StopLosses : Indicator
        {
            [DllImport("C:/ClientTraderConnectionClass.dll")]
            public static extern double GetTest();
    
            protected override void OnBarUpdate()
            {
                try 
                {
                    TestNumber.Set(GetTest());
                }
                catch(Exception ex) 
                { 
                    TestNumber.Set(-5);
                }
            }
        }
    Can someone please help me setup this function correctly? I have also tried using the line:

    TestNumber.Set(ClientTraderConnectionClass.StopLos ses.GetTest()); to no avail.

    Thanks in advance,
    Ben

    #2
    Unfortunately that is beyond what we provide support for. As last resort you could contact a certified NinjaScript consultant: http://www.ninjatrader.com/webnew/pa...injaScript.htm
    DierkNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      Unfortunately that is beyond what we provide support for. As last resort you could contact a certified NinjaScript consultant: http://www.ninjatrader.com/webnew/pa...injaScript.htm
      Thanks Dierk, I know that ... am used to reading it from you on this forum... Hoping other developers out there might read the thread and have something to offer

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Island_Boy_Trading, Today, 07:39 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by cmarkb, Today, 07:19 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by wjadevries, Today, 03:29 AM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by Oracletrades, Yesterday, 09:10 PM
      1 response
      119 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by ginx10k, Today, 07:04 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X