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

    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

    Comment


      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.

      Comment


        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.
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment


          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.
          JesseNinjaTrader Customer Service

          Comment


            add my vote

            Comment


              Hello thehammer,

              I've added your vote to SFT-3124.
              Thank you for your vote!
              Chelsea B.NinjaTrader Customer Service

              Comment


                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!

                Comment


                  Hello t00ts,

                  I've added your vote to SFT-3124. Thank you for your vote.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    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?

                    Comment


                      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.
                      Bruce DeVault
                      QuantKey Trading Vendor Services
                      NinjaTrader Ecosystem Vendor - QuantKey

                      Comment


                        Originally posted by t00ts View Post

                        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!
                        I do not have a public sample. I will consider making one once current code projects are stable enough. I have a full time job and am working ninja 20-40 hours per week.

                        Comment


                          It's insane that 3 years later, this is still an open issue, and votes are being counted. C# 5 came out in 2012! You would think that NinjaTrader is run by a government agency with how stuck in the past the technology is.

                          In any case, please add my vote to SFT-3124.


                          I think it would be great for someone to publish a tutorial or fork-able template repo to create an add-on. For the cause...

                          Comment


                            Hello reticent67,

                            Thank you for your vote.

                            I've submitted your vote for SFT-3124 as well.
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              +1 from me as well. Though, instead of C# 6 which is almost a decade old, if there's a ticket in place to target at least version 8 so we can use .NET Core that would get all my votes.

                              Comment


                                Hello pshift,

                                Thanks for your voice. I've added your vote to SFT-3124.
                                Chelsea B.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by carnitron, Today, 08:42 PM
                                0 responses
                                4 views
                                0 likes
                                Last Post carnitron  
                                Started by strategist007, Today, 07:51 PM
                                0 responses
                                6 views
                                0 likes
                                Last Post strategist007  
                                Started by StockTrader88, 03-06-2021, 08:58 AM
                                44 responses
                                3,969 views
                                3 likes
                                Last Post jhudas88  
                                Started by rbeckmann05, Today, 06:48 PM
                                0 responses
                                5 views
                                0 likes
                                Last Post rbeckmann05  
                                Started by rhyminkevin, Today, 04:58 PM
                                4 responses
                                58 views
                                0 likes
                                Last Post dp8282
                                by dp8282
                                 
                                Working...
                                X