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

class libraries and NinjaScript

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

    class libraries and NinjaScript

    Hi,

    I am considering porting a large, object-oriented Java ATS to NinjaScript.

    My main question is, does the script editor support compiling and linking many classes each in their own source file? (Good) Or do you have to cram all classes used by a strategy into its source file (Bad). Or can you write the supporting classes in an external tool such as Visual C# Express and link to them from the strategy?

    Thanks

    #2
    You can do what you want, but it is unfortunately outside the scope of what we can support. Visual C# Express is not supported. Visual Studio Standard or higher versions are compatible.

    Josh P.NinjaTrader Customer Service

    Comment


      #3
      So the built-in editor does not support multiple compilation units for a strategy?

      Comment


        #4
        Cross strategy communication is beyond the level of what we can support here on the forums.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I'm not talking cross-strategy, just splitting up the functionality into multiple classes. Yay or nay?

          Comment


            #6
            Unfortunately we cannot support this level of programming on the forums. Just give it a try. You will see what works and what does not work. The editor is a very powerful editor and you will find it to provide a lot of flexibility in all areas.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              I'm just talking about using OOP, which is intrinsic to the language that NinjaScript is based on. It's as advanced (relative to the language) as the GOTO statement in BASIC. Do you honestly not know the answer? Does anybody here know the answer??

              Comment


                #8
                andrewbee,

                Please understand the nature of these types of questions. From our experience they quickly spiral into areas of OOP that we just do not have the bandwidth to support. As such we leave it up to the user to try.

                Since you have been persistent in trying to get a yes or no response and I understand where you are coming from so the answer is yes, you can create your own classes. Unfortunately this is to the extent in which we can assist you in this matter. Good luck.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  andrew,

                  It can be done. Do you have visual studios?

                  breaking things up into multiple classes in what way?

                  can you give me some more info?

                  thanks
                  mrlogik
                  NinjaTrader Ecosystem Vendor - Purelogik Trading

                  Comment


                    #10
                    How to compile VS Form.cs&LINQ Dataclasses into strategy
                    mrlogik,

                    I created a form in the Windows Form Designer in Visual Studio. The form will display in the Initialize() method and then be closed before the actual strategy starts running. Plus, I created Language Integrated Query(LINQ) DataClasses for accessing a SQL Server Database from my custom strategy. How do I go about compiling/including the custom form and dataclasses source code files created in Visual Studio 2008 Professional along with the NinjaTrader assembly/files? I'd prefer to copy and paste files from folder to folder and add the necessary "using" directives as opposed to copy and pasting actual source code into my custom strategy file. I tried copy&pasting the actual files into the NinjaTrader/Custom/Strategy folder but it's not compiling successfully from the NinjaTrader script editor. The files compile successfully from within Visual Studio 2008 Professional. Is there a way to do it all from Visual Studio while allowing VS to handle it?

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by TraderG23, 12-08-2023, 07:56 AM
                    9 responses
                    382 views
                    1 like
                    Last Post Gavini
                    by Gavini
                     
                    Started by oviejo, Today, 12:28 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post oviejo
                    by oviejo
                     
                    Started by pechtri, 06-22-2023, 02:31 AM
                    10 responses
                    125 views
                    0 likes
                    Last Post Leeroy_Jenkins  
                    Started by judysamnt7, 03-13-2023, 09:11 AM
                    4 responses
                    59 views
                    0 likes
                    Last Post DynamicTest  
                    Started by ScottWalsh, Yesterday, 06:52 PM
                    4 responses
                    36 views
                    0 likes
                    Last Post ScottWalsh  
                    Working...
                    X