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

Example of Microsoft One Drive trashing my NT8 dev session.

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

    Example of Microsoft One Drive trashing my NT8 dev session.

    My machine blue screened in the middle of debugging an NT8 and upon rebooting I can neither start NT8 nor Visual Studios 2022 with the NT8 solution (b/c NinjaTrader.Custom.csproj cannot be opened).

    This is why:

    Click image for larger version  Name:	image.png Views:	0 Size:	20.7 KB ID:	1216328
    Click image for larger version  Name:	image.png Views:	0 Size:	55.9 KB ID:	1216330
    Click image for larger version  Name:	image.png Views:	0 Size:	66.5 KB ID:	1216331

    I suspect the blue screen was a OneDrive issue, but it's impossible to know.

    It seems like the only thing I can do for the moment is wait to see if the files sync up.

    Even though I can manually open the workspace file, NT8 hangs when trying to open it.

    I cannot open the csproj file either manually or through Visual Studio 2022.

    Let me know if I have other options, excluding uninstalling or disabling OneDrive.

    Thanks in advance for any help you can provide as I am dead in the water for the moment.

    #2
    Ok. I am back up. I futzed with OneDrive to restore older versions and then newer versions. I also cold booted my machine. The combination of those two activities enabled me to relaunch and repair my situation. Not sure what else that crash stomped on -- I had to reenter my NT8 key the first time I got it launching again.

    It's not great that Microsoft has everyone using this system that is unstable, obvs. I guess one has to develop around the possibility that any given file won't be available thanks to high network traffic, which seems pretty onerous.

    Comment


      #3
      Hello carnitron,

      Thanks for your note.

      NinjaTrader should not be used with OneDrive as you will see file access violations and other issues when OneDrive tries to sync files to the cloud.

      If you are currently using OneDrive, please redirect your Documents folder to a local hard drive on your PC, then reinstall NinjaTrader.

      I have included a link outlining how to remap your Documents folder below.I would also recommend going through OneDrive to make sure OneDrive isn't set to continue to backup the Documents folder. Please see the following link that outlines how to make changes in OneDrive:I have included instructions on how to reinstall the NinjaTrader platform below. With this procedure you will not lose any Workspaces, Charts, custom items etc. You'll need a license key for this procedure, which I've included below. These steps wont affect your current license key (if different):
      • @SIM-A82F-D583-40B1-AE74-B79F-705D-1952
      Please follow these steps:
      • Close all running applications.
      • Make sure NinjaTrader is closed from the Windows Task Manager:
      • Press CTRL + ALT + DEL on your keyboard > Start Task Manager...
      • Then from the Start menu select --> Control Panel --> Add and Remove Programs or Programs and Features
      • From Add and Remove Programs select NinjaTrader 8 and click Remove.
      • Restart your PC.
      • After NinjaTrader is uninstalled, navigate to the following folders and delete any "NinjaTrader 8" folders located here if any: C:\Program Files (x86)\
      • or
      • C:\Program Files\
      • Once these steps are completed, download and install NinjaTrader from the link below:
      • https://ninjatrader.com/PlatformDirect (* This is where you will need to input your license key to download)
      ​Please let me know if I may assist further.
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        Ok last I read, it seemed like this was an issue without decided upon guidance. This new info seems reasonable - I will migrate off OneDrive when I get a moment. Thanks for the info.

        Comment


          #5
          I have finally figured out how to deal with this and have a bunch of information here that is helpful to people.


          First, comments on the above info:

          1. https://winaero.com/how-to-disable-w...save-location/

          This does not actually do anything meaningful on my machine. It sets up new directories at the new location, but nothing uses them. This page was written in 2015, and we've had many Windows updates since then and I think the behavior of Windows/OneDrive has evolved, rendering this page obsolete.

          2. https://www.windowscentral.com/windo...e-folders-sync

          This link also appears to be obsolete. It was written in 2018. Windows/One Drive no longer lets you turn of syncing on the Documents folder. If you try to deselect "Documents", you get the error:

          "Can't stop syncing folder. The folder you tried to unselect is the Windows Documents folder, which is an important folder in Windows and is currently pointed to OneDrive."


          No amount of fiddling with OneDrive or Windows enabled me to exclude the Documents folder or parts thereof from OneDrive. I spent several hours trying different things.


          What I did to solve the issue:

          1. Backed up my Ninja Trader 8 folder in Documents.

          2. Deinstalled NT8. Rebooted.

          3. Deinstalled OneDrive. Rebooted.

          4. Tried this:

          https://www.cedarville.edu/insights/...ion-in-windows

          5. But this lead to this problem:

          https://www.thewindowsclub.com/cant-...-same-location

          I followed the instructions here, but they are incomplete also. However, one of the comments below the article got me all the way:

          "Great article! But I found a couple of other things that caused me problems when trying to move the "My Pictures" folder back to the default location that only became evident when examining the registry. There were two other parameters listed above the "My Pictures" value that were also pointing to \OneDrive\Pictures. Only when I also changed their values to %USERPROFILE%\Pictures did the move actually take effect. Not sure what they were, but they were showstoppers until I changed them! Many thanks for the article, Ashish."

          Though I just followed these instructions for the "Documents" folder, not anything else.

          6. Reinstalled NT8 and confirmed it worked with the new set up.

          7. Reinstalled OneDrive. HOWEVER, it gives you options on which folders to sync and you must deselect "Documents" in the installer. Only then you can you get OneDrive's clutches off of the Documents folder.


          So now I have a custom Documents directory on a local SSD, not OneDrive, but I can still use OneDrive in all the other ways I need.

          I think most of the issues here actually come from Microsoft trying competing solutions for customizing the Documents directory over the years, and not having a clean, complete way of migrating between them. It seems like newer Windows 10 installations (like on a new machine) break the old method of changing the Documents folder Location from prior versions of Windows.


          Cheers.
          Last edited by carnitron; 09-25-2022, 06:19 PM.

          Comment


            #6
            Well done, carnitron . Persistence pays off. May I suggest that your efforts will be even more greatly appreciated here if you document the full step-by-step actions to achieve the goal? This would include very specific instructions on all steps, including details for the Registry changes.

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

            Comment


              #7
              Thank you! When I get a moment I will do as you suggest.

              Though what would be even better is for NT support to read my steps above, validate them, and then do it officially. The steps originally provided did not work, but these steps do. At least on more recent Windows 10 installations.

              Comment


                #8
                Hello carnitron,

                Thanks for your note.

                I have tested the steps you noted and they do work to resolve this matter regarding redirecting your Documents folder to a local hard drive.

                Let me know if I may further assist.
                Last edited by NinjaTrader_BrandonH; 09-28-2022, 08:17 AM.
                Brandon H.NinjaTrader Customer Service

                Comment


                  #9
                  That is awesome to hear Brandon, TY. Would it be possible to post the updated instructions here when you have them?

                  Comment


                    #10
                    Hello carnitron,

                    Thanks for your note.

                    After further testing, both sets of instructions worked to redirect the Documents folder to a local hard drive.

                    The instructions shared in post # 3 worked for me to redirect the Documents folder to a local hard drive on the PC.

                    The instructions that you shared in post # 5 also worked to redirect the Documents folder to a local hard drive.

                    If the directions in post # 3 do not work, you could use the exact steps you mentioned in post # 5 to redirect your Documents folder.

                    Let me know if I may further assist.

                    Brandon H.NinjaTrader Customer Service

                    Comment


                      #11
                      jeronymite I am super swamped and out of time for updating the instructions above. I hope people find them self-explanatory as is. It's a little extra verbiage to work through, but not much.

                      Comment


                        #12
                        An update. (And heads up @jeronymite.)

                        So I needed to get my development environment working on my laptop, which runs Windows 11. On that platform, the current OneDrive installer is more aggressive about seizing your directories and gives you no ability to select which directories to ignore.

                        This led to quite a bit of repair work for me yesterday; the installer explained that it would move my directories over to OneDrive, and then instead of giving me the dialog I expected that would enable me to select which directories to include/exclude, it proceeded to yank my "Ninja Trader 8" directory out from under NT8 while it was still running with no option to cancel. That did not end well.

                        Here is my latest summary on what you need to do to get NT8 to play nice with OneDrive, on Windows 11:

                        1. Deinstall OneDrive.

                        2. Go to RegEdit and change this key:

                        "Computer\HKEY_CURRENT_USER\Software\Microsoft \Win dows\CurrentVersion\Explorer\User Shell Folders\Personal"

                        so that it points to a directory you DON'T want OneDrive to touch. For instance, in my case: "C:\Dev".

                        3. Install NT8, which will cause it to use this directory.

                        4. Go back to RegEdit and change the same key to point to something that OneDrive likes, that will redirect it away from NT8. A good choice for this seems to be: %USERPROFILE%\Documents

                        5. Install OneDrive.

                        6. Go back to RegEdit and change that same key back to the directory you want NT8 to use. In my case, this means back to "C:\Dev".

                        7. You should be good at this point.

                        HOWEVER. There are several larger issues to consider here:

                        1. Windows 11 will make your custom directory (e.g. my C:\Dev directory) show up as "Documents" in Explorer with a Documents icon. Only if you click on its properties will you see the real directory name. So there is additional voodoo in play here.

                        2. In general, fiddling with core Windows stuff like this in the Registry is a high peril activity. While what I am describing here appears to work without issue, who knows if that's really true or what the future holds as Microsoft's software continues to evolve.


                        Honestly, I think the real approach that is needed here is for NT8 to give people the option to choose a directory that is NOT the Documents folder OneDrive wants to wrap its tentacles around. It's just this one registry key that NT8 is using, so this could be a pretty simple change.

                        That feels like it would be so much simpler than having everyone go through the madness above, and leaving people vulnerable to future unknown unknowns. Like, if steps 1-6 above are what is really needed to make NT8 work on Windows 11, how is it normal or reasonable to impose that on people? If you are a new user, how would you know that to use the product successfully you need to discover a secret complicated install process? I am very invested in NT8's success at this point, so hopefully I am missing something basic here.

                        Another, maybe even better (albeit more complicated) option would be to install to the regular Windows Documents folder, but then put the Ninja Trader Custom solution source (i.e. the bin\Custom directory) in another location. Even Microsoft puts people's code in:

                        Users\<Username>\source\repos

                        these days -- which is NOT on OneDrive -- so it's not like there isn't precedent from them on this matter.

                        Cheers.
                        Last edited by carnitron; 02-06-2023, 12:45 AM.

                        Comment


                          #13
                          Originally posted by carnitron View Post
                          Honestly, I think the real approach that is needed here is for NT8 to give people the option to choose a directory that is NOT the Documents folder
                          Agreed!

                          Hopefully, with NT8 moving to SQLite this 'feature' can become official.

                          Comment


                            #14
                            Thanks, carnitron for your experimentation, explanations and documentation. Very beneficial to any who should need it.

                            Ideally, Microsoft features should be more user-configurable. We know from experience that often, instead of becoming more so, features often become "more mandatory", despite perfectly reasonable objections from a multitude of users.

                            A similar concept exists for features in any software, where an ever increasing number of users plead for a feature to be more user-configurable, but it doesn't eventuate for a very long time, if at all.

                            Both situations are "unfortunate". If, technically, user-configurability is possible and is implemented well with safeguards against "silly misconfigurations", and with sensible defaults that will suit a majority of users, there is every reason to do it.

                            The more easily usable that software is for everyone, the greater will be the success and reputation of the software. Higher sales are more likely, and it demonstrates two key components of product creation:
                            • Products should be made to do what they say they do, and do it effectively and efficiently
                            • Customers are the means of success of products -- as such, they should be respected. Implementing customisability within a product demonstrates this respect, most notably when there is high demand for particular customisations, or where the implementation relieves customers of burdensome (and error prone) manual customisations that may be required for very valid reasons that are commonly encountered
                            There is always a need to consider the cost of implementation and maintenance. That's simple business logic. But what can often be missed by that consideration is the intangible cost of not doing it, including loss of confidence in a product, modes of "unintended usage" of a product that become more prominent in the absence of high-demand, yet unfulfilled features, and effects on a product's reputation (justified or unjustified) when dissatisfied customers make their dissatisfaction/frustration known. Ultimately, customers choose how to respond to a product's evolutionary trajectory, and some will walk away if it proves repeatedly unsatisfactory to them. That's not necessarily a bad thing -- not all products prove to be the right choice for people who try them, despite being excellent products for the majority of customers. Customer "churn" is part of the commercial landscape. It's how, how much, and why churn happens that matters.

                            Product management is a mix of many things, including business strategy, market landscape and competitiveness, economics, understanding of target customer base, resourcing, design, technology, personnel capabilities, science, art, etc ... and a lot of common sense. Sadly, the last item is often missing, as the spreadsheets tend to obscure the human elements in production and consumption. More respect and regard for the people involved (both as producers and, certainly, as consumers) almost always pays dividends in a multitude of ways, not least economically.

                            Here's hoping the feature discussed in this thread becomes reality sooner rather than later.

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

                            Comment


                              #15
                              My suspicion as to Microsoft's decision making here is as follows:

                              1. They are aggressively trying to get people on as many of their services as possible, which makes sense, given how successful Apple and Google have been here. But, I suspect it leads to them eliminating even useful complexity when that complexity is an obstacle to capturing new customers. I've been in product situations where it's clear that even an extra dialog during an install process has a clear numerical impact on this kind of user capture.

                              2. I am a fan of Einstein's aphorism "Make everything as simple as possible, but no simpler". I've seen Microsoft get this wrong in both directions. In my experience, pro-simplicity people, while right most of the time, tend to be sort of a messianic lot and focus super intently on cutting this and that, but less intently on whether they are throwing the baby out with the bathwater.

                              In the case of OneDrive, a little "Advanced options" link on the install dialog would be more considerate of users, I think.

                              As for NT8, I see this less as a choice between simplicity and configurability, and more as a serious bug. Anyone who installs NT8 on a machine with OneDrive (almost everyone, given that MS installs it by default) is going to run into inexplicable failures sooner or later.
                              Last edited by carnitron; 02-06-2023, 10:14 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by maybeimnotrader, Today, 05:46 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post maybeimnotrader  
                              Started by quantismo, Today, 05:13 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post quantismo  
                              Started by AttiM, 02-14-2024, 05:20 PM
                              8 responses
                              166 views
                              0 likes
                              Last Post jeronymite  
                              Started by cre8able, Today, 04:22 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post cre8able  
                              Started by RichStudent, Today, 04:21 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post RichStudent  
                              Working...
                              X