Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Namespace changes when file is moved to subfolder

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

    Namespace changes when file is moved to subfolder

    Hello Ninja!
    I have noticed that if you use a custom namespace in an indicator file ( for instance if you put your enum varaibles within a separate namespace) and move the file to another custom subfolder, then this namespace changes to the namespace of the subfolder. This is undesirable.

    #2
    Hello poseidon_sthlm,

    Thank you for the note.

    I can not reproduce the issue you described with my steps. Could you please list your exact steps to make the namespace change in the .cs file?

    I look forward to your reply.

    Comment


      #3
      This is what I do:
      1. In my custom indicator I put my enums in a separate namespace. (One of my parameters is an enum)
      2. I drag and drop the indicator file to a custom indicator subfolder.

      This operation changes the namespace to the namespace of the subfolder.

      I have attached a simple as possible example indicator that you can test to drag and drop to a subfolder.
      Attached Files

      Comment


        #4
        Hello poseidon_sthlm,

        Thank you for posting the test script.

        I took these steps, but the namespace "MyEnum" did not change.

        1. Placed the "TestNamespace.cs" indicator in the indicators folder, compiled.
        2. Closed down NinjaTrader 8, added a folder within ..\Documents\NinjaTrader 8\bin\Custom\Indicators named "MyTestFolder"
        3. Placed the "TestNamespace.cs" indicator within "MyTestFolder".
        4. Start NinjaTrader.

        Check to see if you are on the latest version of NinjaTrader 8 (8.0.15.1). You can check by going to Help>Abount. If you are not on the latest version, please take the steps below to update your installation:
        1. First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
        2. Click on the link: http://ninjatrader.com/PlatformDirect
        3. Enter your license key and press Submit
        4. Select 'NinjaTrader 8'
        5. Select 'Download'
        6. Critical: Before running the installer, ensure NinjaTrader is closed.
        7. Run the installer


        I look forward to hearing of your results.

        Comment


          #5
          It happens when I drag and drop the indicator between folders in the 'NinjaScript Explorer' (within the NT Editor).

          Comment


            #6
            Hello poseidon_sthlm,

            I was able to reproduce this now. This item will be reported to our development team. I will follow up here once I have more information.

            Thanks in advance for your patience.

            Comment


              #7
              Hello,

              Thanks for your patience.

              This behavior would be expected through the NinjaScript editor. If you do not want the namespace so be renamed, move the files through the File Explorer rather than the NinjaScript editor.

              Please let me know if I can assist further.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              574 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              332 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              553 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              551 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X