Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Calling DLL from strategy
Collapse
X
-
Calling DLL from strategy
I am using version 7. I am attempting to call a DLL function from my strategy. I have added all of the relevant DLL's in the bin/custom directory. I have referenced the DLL and the strategy builds successfully. The initialisation fails with an error: Could not load file or assembly ... The system cannot find the file specified. A similar exercise in version 6.5 worked. Are there any changes in the new release that would cause this error? Is there a way of finding which file is missing?Tags: None
-
Is the dll a protected dll?Originally posted by brucieW View PostI am using version 7. I am attempting to call a DLL function from my strategy. I have added all of the relevant DLL's in the bin/custom directory. I have referenced the DLL and the strategy builds successfully. The initialisation fails with an error: Could not load file or assembly ... The system cannot find the file specified. A similar exercise in version 6.5 worked. Are there any changes in the new release that would cause this error? Is there a way of finding which file is missing?
-
I tried creating a simple class library DLL with only one API, added it to the reference, added using statement and call to API in strategy code. All compiles cleanly but still same problem when I run a backtest. It can't find the DLL. This new class library doesn't reference any other DLL but Ninja is still unable to load it.
Comment
-
I am having the exact same problem; has there been any resolution of this issue?
I even tried changing the constructor in the dll and then recopying it to the bin->Custom directory. When I restarted NT, I got the message I had a programming error in one of my strategies. This was now correct since the old new() statement was no longer valid.
I corrected the error by adhering to the new constructor and yet the same "can't find..." message when trying to use the dll. NT can find the assembly such that it can give me a compile error but can't load it because it can't find it.
I am likely doing something very simple incorrectly but this is how I would load a dll in a non NinjaTrader project.
Best Regards,
Scott
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
605 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
351 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment