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!
See more
See less

Partner 728x90

Collapse

NinjaTrader 8.0.23, .Net Framework 4.8 and C# Version

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

  • QuantKey_Bruce
    replied
    Yes. In fact, it does not even have to be in C# if you use extern declarations and stdcall just like any other unmanaged DLL.

    Leave a comment:


  • mballagan
    replied
    Originally posted by QuantKey_Bruce View Post
    That is true - you also could make an external DLL and code it however you want - it doesn't even have to be in C#.NET - and then just write wrapper code in the supported framework. That has some overhead but opens up a whole world for how you do the rest of the project.
    Is it possible to have a DLL that uses version C# 7.0 and .NET Core and reference this as an external DLL?

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello t00ts,

    I've added your vote to SFT-3124. Thank you for your vote.

    Leave a comment:


  • t00ts
    replied
    Originally posted by BartMan View Post
    My team is placing most code in an add-on. The addon can use the latest C# version/features. It is more advanced but it is possible to
    Would it be possible for you to give a quick outline on how I could go about this? Could you share some insights/resources/guidelines on project setup and workflow?

    Much appreciated.

    --

    P.S. Please add my vote for SFT-3124!

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello thehammer,

    I've added your vote to SFT-3124.
    Thank you for your vote!

    Leave a comment:


  • thehammer
    replied
    add my vote

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello JGRtrader,

    If you are opening the VS project using the button that will open the NinjaTrader custom project which uses 4.8 code, if you are trying to use C# code from a newer version of C# you would need to find an alternate way to do that task instead of using that code. If you try to use features from a newer C# version then visual studio will let you know you need to use a newer version because it knows about those type of items as part of its design. NinjaScript code needs to be 4.8 or less compliant code to compile. That applies to both the NinjaScript editor or when you edit in visual studio by using the VS toolbar button.

    If the code you are trying to use is something you found online you may need to search for other samples of that concept and try those instead. You can include ".net framework" as part of your search to get more relevant samples for C# 4.8 code.

    Leave a comment:


  • QuantKey_Bruce
    replied
    That is true - you also could make an external DLL and code it however you want - it doesn't even have to be in C#.NET - and then just write wrapper code in the supported framework. That has some overhead but opens up a whole world for how you do the rest of the project.

    Leave a comment:


  • JGRtrader
    replied
    I am just using VS as an editor for NinjaTrader. I think the compiles are done in the NT application. I am running NT 8.1.1.7 right now. I do not run a project in VS. The VS I have is just plain vanilla and I call it with the icon in the NT Editor.

    Leave a comment:


  • BartMan
    replied
    My team is placing most code in an add-on. The addon can use the latest C# version/features. It is more advanced but it is possible to

    Leave a comment:


  • QuantKey_Bruce
    replied
    Do you have Visual C#.NET installed and not just C# Tools? The screenshot makes it look like you're trying to use the C++ compiler, though maybe it doesn't show everything because it's cut off.

    Leave a comment:


  • JGRtrader
    replied
    I start VS with the icon on the NT Editor. I assume I would get a message if my system was not set up correctly for my system. I attached a clip of the Visual Studio about screen.

    This happens to me only occasionally, typically when I google for hints, and then I try it and receive a notice something like, this feature required .NET 7 or such. I learn quickly not to try that again. I am OLD (key word) and haven't done much programming for several decades so a lot of what i used to do, does not work in current Object Oriented languages.

    Click image for larger version

Name:	VS about .png
Views:	235
Size:	77.6 KB
ID:	1255890 .

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello JGRtrader,

    If you are trying to use VS to make something for NinjaTrader you need to select the correct type of project, if you see that it is using a newer version of .net you have selected the wrong type of project. To make a library for NinjaTrader 8 you need to select the following in visual studios new project wizard:

    Language: C#
    Platform: Windows
    Type: Library

    Scroll down the list to find Class Library (.net framework), it should say C# Windows Library below it. There are other Class Library projects in the list for other versions of .net like .net core and standard which will not work with NinjaTrader. Pay careful attention you are selecting the one with (.NET Framework) in the title.

    Leave a comment:


  • JGRtrader
    replied
    Add my vote too. VS keeps telling me I need .NET 7 for what t code.

    Leave a comment:


  • chadnash
    replied
    Please add my vote as well… this has kept countless clients from moving to NT and I hope this multi year, much requested feature (more compatibility issue) gets addressed. Honestly it kind of kills my belief in the voting system as I have never seen an issue with so many votes.

    Thanks!

    Chad

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by RookieTrader, Today, 09:37 AM
4 responses
17 views
0 likes
Last Post RookieTrader  
Started by PaulMohn, Today, 12:36 PM
0 responses
2 views
0 likes
Last Post PaulMohn  
Started by love2code2trade, 04-17-2024, 01:45 PM
4 responses
38 views
0 likes
Last Post love2code2trade  
Started by alifarahani, Today, 09:40 AM
3 responses
14 views
0 likes
Last Post NinjaTrader_Jesse  
Started by junkone, Today, 11:37 AM
3 responses
22 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X