• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compiling a script from the code

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

    Compiling a script from the code

    Hi

    I want to generate a strategy, add .cs to NinjaTrader.Custom.csproj and run C# compiler after to get NinjaTrader.Custom.dll
    How I could run the compiler from my code?

    #2
    Hello ren37,

    I am not certain I understand the question, are you trying to add some functionality similar to how NT8 auto compiles upon saving with visual studio? Can you explain your goal further?

    In general, there is nothing I can provide to call the compiler from visual studio or from code if this is what you are asking. For NT7 you would need to keep an indicator open (ADL) and compile from that indicator if you are using visual studio as the syntax editor. This has been corrected in NT8 as it now auto compiles when saving.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse

      As I said, first I want to generate source code for a strategy from my add-on. Then I need to compile generated .cs file to use the strategy in Ninja. How can I run built-in C# compiler from my add-on? So I need to do the same thing when you click Compile button in Strategy Builder.

      Comment


        #4
        Hello ren37,

        You noted "add-on" and "strategy builder", is this question for NT8 instead of NT7? If so I will move this to the correct sub forum. NT7 does not have add-ons, do you mean an indicator or strategy?

        In any case, I still would not have a solution in either version of the platform in regard to the compiler. There is no documented/supported way to access the compiler in NinjaTrader from NinjaScript in 7 or 8. If you have an addon that is generating some code and you are using NT8, if you are generating the code into the correct directory for NinjaScript items the platform will detect the change if the NinjaScript editor is open. For NT7 there would be no suggestion I could make other than you need to manually compile from any script such as the ADL to see outside changes.

        Please let me know if I may be of additional assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Yes, this is related to Ninja 8
          I think you could add this functionality
          I'm a vendor and I need this for one of my products.
          Thank you

          Comment


            #6
            Hello ren37,

            Thank you for the reply.

            I will put in a feature request for this, once I have a tracking id I will post that here.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fluffier, Yesterday, 11:49 PM
            0 responses
            2 views
            0 likes
            Last Post fluffier  
            Started by GARZONJ, Yesterday, 09:02 PM
            0 responses
            2 views
            0 likes
            Last Post GARZONJ
            by GARZONJ
             
            Started by bouncetherubble, Yesterday, 08:42 PM
            0 responses
            3 views
            0 likes
            Last Post bouncetherubble  
            Started by connorgrant5, Yesterday, 01:33 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by Mykro, Yesterday, 01:28 PM
            7 responses
            17 views
            0 likes
            Last Post Mykro
            by Mykro
             
            Working...
            X