Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
NT8 version of Newtonsoft.json
Collapse
X
-
NT8 version of Newtonsoft.json
I tried to import from the .zip the current version of Newtonsoft.json for an API I am using in an indicator, and the error message stated that it's for an older version of NT, most likely 7. I did open the Newtonsoft project in Visual Studio 2017 Pro, and the namespace looked the same as what's in the using statement. Any suggestions?Tags: None
-
Hello pel11,
Thank you for the post.
I wanted to check, you said you tried to import the Newtonsoft zip file, this is not a NinjaTrader import so this would not work. Are you trying to develop using Newtonsoft in your code or are you trying to just update this file for something you have that uses it?
If you are trying to use this in your code, you would need to manually place this file in the bin/custom directory and correctly reference it in the NinjaScript editor. If you are already referencing the included version that is in the Program Files (x86)\NinjaTrader 8\bin64 folder, that should not be updated and should only be referenced. If you want to target a specific reference it needs to be added to the bin/custom folder and referenced from there instead.
If this is something that is already used and you just wanted to update it, I wouldn't suggest trying to update Newtonsoft to a newer version unless you specifically have used this in your own code and require that target version of this dependency. If other items you have imported also use Newtonsoft and you update the file, that may break the other items that use it.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Hello pel11,
Using third-party resources such as Newtonsoft in NInjaScript would be outside of what our support could assist with or provide samples of. This is something you will need to diagnose and work through on your end. You can use third-party references in your own programming but this is something you would need to reference in the NinjaScript editor for it to work.
Have you at this point referenced this DLL in the NinjaScript editor? Dropping the file in the bin/custom folder would only be part of being able to use that DLL. You also need to reference the dll using the NinjaScript editor -> Right Click -> References menu. Have you done this?
Additionally, if you plan to export the item later, you would need to add the DLL to your export. https://ninjatrader.com/support/help...esOrNativeDlls
I look forward to being of further assistance.
JesseNinjaTrader Customer Service
Comment
-
I'm using Newtonsoft.json in Ninjatrader 8 without any issues. I'm not using the latest version I'm using v10.0.2 - haven't had the need to upgrade from that point.
I expect the error message you're getting is due to the DLLs being built with the wrong verion of .NET rather than the wrong version of NT. You need the Newtonsoft .NET 4.6 DLLs.
I've attached the DLLs I'm using, copy these to Documents/Ninjatrader 8/bin/custom and add the files via "References" menu item in Ninjascript editor.
- Likes 1
Comment
-
- Likes 1
Comment
-
-
Hey Brett. I'm using Newtonsoft.Json extensively in my Ninjatrader development - in addition to about 6 or 7 other DLLs which I'm also loading via the Ninjascript editor. I've had no issues in 8.0.17.0 or any other releases thus far. The person who opened the forum post hasn't responded further, so I assume all is good with him too?
I've only been testing 8.0.17.0 for a few hours today. After 8.0.16.0 fiasco I was reluctant to upgrade, but since the forums have been fairly quiet, I decided to upgrade and throw a few trades in late on Friday for some testing while it was quiet - I had no issues with any of my addons, strategies or indicators in the hour or two I was testing live. I'm going to do more extensive testing over the weekend. If you have any specific Newtonsoft.Json / external DLL concerns please let me know specifics and I will try to reproduce.
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by CortexZenUSA, Today, 12:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:53 AM
|
||
Started by CortexZenUSA, Today, 12:46 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:46 AM
|
||
Started by usazencortex, Today, 12:43 AM
|
0 responses
5 views
0 likes
|
Last Post
by usazencortex
Today, 12:43 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,265 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
11 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment