Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MachineLearning DLL /or systems

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

    MachineLearning DLL /or systems

    I'm having an issue with registering a DLL.
    I've added it to references, etc.

    Getting the following error...

    Strategy 'NNTrain': Error on calling 'OnStateChange' method: Could not load file or assembly 'NNT, Version=1.5.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    I have found in some other threads that in NT8 the DLL must be .Net 4.5. Is that correct?
    My DLL is .Net 2.0 and unfortunately the software I use is out of production (Peltarion Synapse) and I cannot update it to produce a DLL that's more recent than 2.0

    If this is the case, that NT8 is restricted to 4.5, are there any other way's to get that .Net2.0 working that someone could recommend?

    Alternatively I'll have to migrate to Azure ML. Could some one point me to some basic code where they reference azure ML as part of a strategy. Looking for basic code to understand how you would connect.

    #2
    Before you registered the file, did you first move it to bin/Custom?

    After the DLL has been moved to bin/Custom, then open NinjaScript
    Editor, right click, goto References, and select your DLL file.

    Finally, restart NinjaTrader.

    Give that a try.

    Comment


      #3
      Hello Trader Mike Kilo,

      Thank you for your post.

      NinjaTrader uses the C# 5.0 programming language targeting .NET 4.8 for developing custom NinjaScript AddOns. Using external programming languages is not documented nor supported and we would not be able to provide assistance.

      Documents\NinjaTrader 8\bin\Custom is the proper place for a 3rd party referenced assembly DLL.

      Support for 3rd party assemblies is limited. Our team is able to assist with adding the DLL and a reference to the DLL, however we cannot assist with its use, or with any errors or unexpected behavior that may occur.

      With that said, we are happy to forward any insightful information we happen to be aware of.

      Below is a link to the help guide on referencing a 3rd party assembly DLL.
      https://ninjatrader.com/support/help...indicators.htm

      Any referenced managed assembly will need to target .NET Framework 4.8 or lower. Other versions of .NET will not work, such as .NET Core or .NET 5.

      Alternatively, unmanaged assemblies can be P/Invoked:
      https://docs.microsoft.com/en-us/dot...nterop/pinvoke
      https://ninjatrader.com/support/foru...300#post777300

      It's possible to use Nuget with Visual Studio to compile DLL for use in NinjaTrader:
      https://ninjatrader.com/support/foru...72#post1042872

      Determining the targeted .NET version for an assembly DLL:
      https://ninjatrader.com/support/foru...858#post798858

      Hopefully moving the DLL to the NinjaTrader 8\bin\Custom folder and adding a reference will help you to resolve the errors. Otherwise, I hope the publicly available links that have been shared are also helpful.

      Thank you for using NinjaTrader.​​

      Comment


        #4
        I have a full working example of how to properly load all the dll's into NinjaTrader and create an ML based strategy without having to call outside of NinjaTrader. It is a little hard to type out all the steps and can get a tad bit confusing with making sure all the proper things line up but feel free to email me and I can help walk anyone through it [email protected]

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        68 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        24 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        27 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        54 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X