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

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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        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.
            Chris L.NinjaTrader Customer Service

            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.
              Chris L.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by GussJ, 03-04-2020, 03:11 PM
              15 responses
              3,268 views
              0 likes
              Last Post xiinteractive  
              Started by Tim-c, Today, 02:10 PM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by Taddypole, Today, 02:47 PM
              0 responses
              2 views
              0 likes
              Last Post Taddypole  
              Started by chbruno, 04-24-2024, 04:10 PM
              4 responses
              50 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              10 responses
              401 views
              1 like
              Last Post beobast
              by beobast
               
              Working...
              X