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

Compiling Script from Command Line

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

    Compiling Script from Command Line

    hi,

    I usually edit the NT scripts using external editor. I am wondering if there's a way to compile scripts externally from command line. By doing that it can save me a lot of time opening my script from NT editor and compiling it from the editor.

    If that's not soemthing doable, please add a feature that will check the timestamp of the opened file in the NT editor and reload the file if the timestamp of the file is newer than the last time NT editor write the file to disk. If the editor has this featuer, there will be no need for me to re-open the file every single time I make a change exteranlly and need to re-compile the script. Thank.

    J

    #2
    Hello,

    Compiling externally is not supported.

    I will forward your suggestion to our development department for consideration.
    DenNinjaTrader Customer Service

    Comment


      #3
      J,

      When you compile ANY script from within Ninja ALL scripts are compiled.

      I too use an external editor to edit Ninja scripts (Visual Studio in my case). What I do is just open any script file within the Ninja editor and leave it open. When I have completed my editing is VS and saved my changes I just switch to the open editor in Ninja and compile. No need to open within Ninja the specific script you were editing in your external editor. The script that you keep open in the Ninja editor can be any script, it does not matter which one, but preferably not any that you are editing externally. Hope that makes sense.

      Although I do wish that the "Indicator successfully generated" would not pop up everytime you compile.
      Last edited by hemlock; 02-15-2009, 08:38 AM.

      Comment


        #4
        Thanks for the input hemlock!
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hey Hemlock ... great idea that's gonna save me lots of time.

          Much appreciated.

          Brian1

          Comment


            #6
            >> I too use an external editor to edit Ninja scripts (Visual Studio in my case)
            Be forewarned: this is not recommended, since the NT editor amends the code and adds logic as needed for proper operation.

            We are unable to support issues resulting from editing the code outside the NT editor.

            Comment


              #7
              The editor itself amends (adds/changes) code?

              Can you give an example?

              Comment


                #8
                Unfortunately this is beyond the scope of what we can provide support for.

                Comment


                  #9
                  Dierk,

                  Are you referring to the code at the bottom of an indicator marked "NinjaScript generated code. Neither change nor remove." that gets generated when the code is created from the wizard? Does this get changed after the initial creation?

                  Comment


                    #10
                    hemlock,

                    The section in there should never be touched and we do not support any modifications in there.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks Josh I understand that, but that was not the question that I asked.

                      Comment


                        #12
                        hemlock,

                        We do not support anything about that section. Unfortunately there is no further information I can provide.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by hemlock View Post
                          Dierk,

                          Are you referring to the code at the bottom of an indicator marked "NinjaScript generated code. Neither change nor remove." that gets generated when the code is created from the wizard? Does this get changed after the initial creation?
                          Yes, it does change after wizard creates the code. It might change after each compilation - depends on what you have changed in your code.

                          Comment


                            #14
                            Thanks roonius.

                            To anyone following my suggestion in post #3 in regards to editing Ninja script in an external editor, please be advised of the following:

                            1. It appears that if you add additional parameters/properties to an indicator via the procedure posted here http://www.ninjatrader-support2.com/...ead.php?t=5782 then the Ninja editor modifies the code at the bottom of an indicator at compilation time to reflect the additions. I suggest that if you use an external editor to add new parameters/properties to an indicator that the script be opened and compiled with the Ninja editor to faciliate this code modification.

                            2. This probably is true for modifiying or deleting parameters/properties as well.

                            3. Following any of my advice is done so at your own risk.

                            Ken

                            Comment


                              #15
                              Hemlock,

                              Do a search on this forum for AutoHotKey. I used that for the purpose of automating NT to do things it doesn't have the capability to do. For example restart automatically and reconnect to a connection and launch a strategy.

                              My guess is that you could do as are you are doing, and then have AutoHotKey actually run the compile command and then hit the ok button for you. So with a simple keystroke, you can compile and click the ok without having to hunt for the ok button or make certain windows active. Part of this would also have you return to your original script. You could put this as a shortcut in your quicklaunch bar and then every time you want to compile, just click that shortcut, let the windows blink and do their thing, and then you will be returned to your VS window.

                              It's a thought, hope it helps.

                              Originally posted by hemlock View Post
                              J,

                              When you compile ANY script from within Ninja ALL scripts are compiled.

                              I too use an external editor to edit Ninja scripts (Visual Studio in my case). What I do is just open any script file within the Ninja editor and leave it open. When I have completed my editing is VS and saved my changes I just switch to the open editor in Ninja and compile. No need to open within Ninja the specific script you were editing in your external editor. The script that you keep open in the Ninja editor can be any script, it does not matter which one, but preferably not any that you are editing externally. Hope that makes sense.

                              Although I do wish that the "Indicator successfully generated" would not pop up everytime you compile.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by WeyldFalcon, 12-10-2020, 06:48 PM
                              14 responses
                              1,426 views
                              0 likes
                              Last Post Handclap0241  
                              Started by Barry Milan, Today, 10:35 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Barry Milan  
                              Started by DJ888, Yesterday, 06:09 PM
                              2 responses
                              9 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              3 responses
                              40 views
                              0 likes
                              Last Post jeronymite  
                              Started by bill2023, Today, 08:51 AM
                              2 responses
                              16 views
                              0 likes
                              Last Post bill2023  
                              Working...
                              X