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

Disable auto compile

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

    #16
    Hi Emily

    Yeah, I don't have the issue with Visual Studio. I was thinking more about your experience with other text editors.

    Comment


      #17
      FatCanary Have you tried Notepad++? Just to see if it works with a single save?

      Thanks.
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #18
        Hi jeronymite

        Thanks for the suggestion.
        I've just tried Notepad++. It exhibits the same behaviour as the other text editors; two saves are required before NinjaScript editor responds.

        I'm not convinced that the issue lies with the editors that I've tried.

        Comment


          #19
          FatCanary I think you are right when you say "I'm not convinced that the issue lies with the editors that I've tried". I've just tried this with Notepad++ and a single save reliably causes immediate compilation in the NinjaScript Editor window. Back to NT Support to investigate further for you, I think.

          Thanks.
          Multi-Dimensional Managed Trading
          jeronymite
          NinjaTrader Ecosystem Vendor - Mizpah Software

          Comment


            #20
            Hello FatCanary and jeronymite,

            Thank you both for your input.

            While the issue doesn't seem to be editor-specific, this is not supported by NinjaTrader because it relates to the use of third-party editors. Additionally, FatCanary has confirmed that the behavior does not occur when using Visual Studio. In order to achieve a resolution, this may require additional research via an internet search, consulting with the support team for one of the editors, or potentially even consulting with a Windows technician in the case that there is something in the registry that could be causing this behavior. Otherwise, please use the NinjaScript Editor directly to edit and compile your scripts or open Visual Studio via the icon in the NinjaScript Editor toolbar and Ctrl + S to save your edits in Visual Studio/compile in NinjaTrader.

            Thank you for your time.
            Emily C.NinjaTrader Customer Service

            Comment


              #21
              Thanks for sharing your finding jeronymite. That has just reinforced my thinking that there is an issue on my machine.

              With that in mind, I have reinstalled NinjaTrader. And that made no difference. Still, worth a try.
              Looks like I need to keep digging...

              Comment


                #22
                Well, I've uninstalled and reinstalled:
                NinjaTrader
                Rider
                Visual Studio

                All that has made no difference to NinjaScript editor picking up on the first save of a file, unless saved in VS.
                Every other editor I've tried has picked up on the file change straight away.

                At this stage, the only other thing I can think of is reinstalling Windows, and I'm not doing that.
                So, it looks like I shall be living with double saves.

                The other strange thing is that when I first started using Rider to edit NinjaScript files, I'm fairly sure that the NinjaScript editor picked up on every edit that I made in Rider, without having to manually save. I remember thinking, "how annoying", much like the opening poster.
                Last edited by FatCanary; 11-19-2022, 09:24 AM.

                Comment


                  #23
                  I'm using Rider with auto-save enabled and Ninja detects code changes automatically and runs the compiler.
                  Rider can also detect changes made in Ninja automatically.

                  Comment


                    #24
                    Yeah, Rider has no problem detecting a change made in the NinjaScript editor.
                    I'm currently using the workaround of saving twice in Rider to get the Ninjascript to compile.

                    Comment


                      #25
                      I use gvim on Windows, every save in gvim forces a compile, as expected.

                      Comment


                        #26
                        Originally posted by bltdavid View Post
                        I use gvim on Windows, every save in gvim forces a compile, as expected.
                        Which further reinforces my opinion that I have an issue with my system.
                        Apart from Visual Studio, all the editors I've tried require 2 saves for the NinjaScript to compile.

                        Comment


                          #27
                          Maybe your Windows is doing too much disk caching?

                          Is your My Documents folder on your local disk?

                          Is your local disk an SSD or HDD?

                          If SSD, does it have disk caching software?

                          Are you on a Mac?

                          Comment


                            #28
                            Want to disable disk caching?

                            Good reading here and here.
                            Last edited by bltdavid; 12-06-2022, 05:29 AM.

                            Comment


                              #29
                              Hi bltdavid

                              My Documents is on a local SSD on Windows.

                              Thanks for the suggestion. I've turned off disk caching, and that's made no difference.

                              Comment


                                #30
                                The double save issue appears to be resolved.

                                Not sure which of the following cured the problem, but...
                                1. Completely uninstalled NinjaTrader
                                2. Reinstalled NinjaTrader
                                3. Compiled scripts in NinjaScript editor (debug mode enabled)
                                4. Opened NinjaTrader.Custom.csproj with Rider
                                And now all is good.
                                Last edited by FatCanary; 01-14-2023, 03:50 PM.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Shansen, 08-30-2019, 10:18 PM
                                24 responses
                                938 views
                                0 likes
                                Last Post spwizard  
                                Started by Max238, Today, 01:28 AM
                                0 responses
                                3 views
                                0 likes
                                Last Post Max238
                                by Max238
                                 
                                Started by rocketman7, Today, 01:00 AM
                                0 responses
                                2 views
                                0 likes
                                Last Post rocketman7  
                                Started by wzgy0920, 04-20-2024, 06:09 PM
                                2 responses
                                27 views
                                0 likes
                                Last Post wzgy0920  
                                Started by wzgy0920, 02-22-2024, 01:11 AM
                                5 responses
                                32 views
                                0 likes
                                Last Post wzgy0920  
                                Working...
                                X