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

How to determine folder path for "Custom" and "Strategies" folders (German, etc.)?

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

    How to determine folder path for "Custom" and "Strategies" folders (German, etc.)?

    Hello,

    I am trying to integrate a C#/WPF app with NinjaTrader 8. I need a way to 100% guaranteed way to determine the folder paths of the following two folders:

    1. "NinjaTrader 8\bin\Custom"
    2. "NinjaTrader 8\bin\Custom\Strategies"

    This may seem really simple, i.e.:

    string fullPathCustom = Path.Combine(Environment.GetFolderPath(Environment .SpecialFolder.MyDocuments), "bin", "Custom");
    string fullPathCustomStrategies = Path.Combine(Environment.GetFolderPath(Environment .SpecialFolder.MyDocuments), "bin", "Custom", "Strategies");

    But I have two concerns:

    1. Could a user install NinjaTrader 8 in a way such that these two folders are not in the "My Documents" folder?

    2. Do the German, French, and other translated versions of NinjaTrader 8 use the same English words for these directory names, or do they use translated versions of "NinjaTrader 8", "bin", "Custom", and "Strategies"?


    Finally, if the code I wrote above won't work for all NinjaTrader 8 users around the world, regardless of custom installation choices and spoken language, what C# code can I use to get the full directory paths of these two directories?


    Thanks in advance!

    EquityTrader

    #2
    Hello EquityTrader,

    Thanks for your post.

    We do not support remapping this folder, but in the case of users using virtual directories or something similar, I would expect your code to work. However, you could consider using our built in directory string NinjaTrader.Core.Globals.UserDataDir to get the Documents\NinjaTrader 8\ folder.

    Sub directories on international installations are the same. Only resource keys will be different when a different language is selected.

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      Sounds great. Thank you very much for the very helpful and quick response!

      EquityTrader

      Comment


        #4
        Hello,
        Related question:
        you wrote above:
        "We do not support remapping this folder, but in the case of users using virtual directories or something similar, I would expect your code to work."

        I would like to store Ninja indicators on encrypted partition instead of default C:\Users\xxxx\Documents\NinjaTrader 8\bin\Custom\Indicators.
        Do you think that creating NTFS symbolic junction would work ?

        Comment


          #5
          Hello xTrader1,

          I can't really comment much here since it would be into unsupported territory, but I may suggest creating a back up and try it to see if it works well enough for you. I'll also ask the community to share their insight for those that have tried this. If you experience some issues, I would suggest switching back to a regular set up to confirm any issues seen are due to remapping the directory.
          JimNinjaTrader Customer Service

          Comment


            #6
            Thanks. I'll try on a fresh installation.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by wzgy0920, 02-22-2024, 01:11 AM
            5 responses
            32 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, Yesterday, 09:53 PM
            2 responses
            49 views
            0 likes
            Last Post wzgy0920  
            Started by Kensonprib, 04-28-2021, 10:11 AM
            5 responses
            191 views
            0 likes
            Last Post Hasadafa  
            Started by GussJ, 03-04-2020, 03:11 PM
            11 responses
            3,230 views
            0 likes
            Last Post xiinteractive  
            Started by andrewtrades, Today, 04:57 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X