Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding new indicator to subfolder changes default namespace

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

    Adding new indicator to subfolder changes default namespace

    Adding new indicator to subfolder will change default namespace. To reproduce:

    (From NS Editor)
    Create subfolder in Indicators folder eg.:
    Indicators/Development
    then right click on Development folder -> "New Indicator" and generate simple indicator.
    You won't be able to compile this newly created indicator since its namespace instead of:
    "NinjaTrader.NinjaScript.Indicators"
    is now:
    "NinjaTrader.NinjaScript.Indicators.Developmen t"

    Removing the Development part fixes it but I don't think it should be the expected behaviour for generating indicators within subfolders.

    #2
    Hello,

    Thank you for the report.

    I do see that in our current internal build this has been addressed or is currently working as expected.

    When following the steps, I too get the "NinjaTrader.NinjaScript.Indicators.Developmen t" namespace, upon compiling it does not fail but instead succeeds.

    Once we release the next beta, can you verify this on your end to ensure this has been fully resolved?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse, yes will do test it with new beta.

      Comment


        #4
        This is how NT8 is set to work and I doubt there will be any changes made about this in any future releases. Any indicators you create in subfolders will have their namespaces set accordingly. And it works seamlessly, see the screenshot below. If compiling fails then error is somewhere else. Just a reminder, always add/remove the folders and indicators in NinjaScript editor, not in VS.

        Attached Files
        Last edited by roslja; 02-11-2016, 04:24 PM. Reason: resize

        Comment


          #5
          Originally posted by roslja View Post
          And it works seamlessly, see the screenshot below. If compiling fails then error is somewhere else..
          No it doesn't. And no I can read the error message just fine. Although it is possible this is precompile error checking that is raising the issue in NS Editor.

          Comment


            #6
            I've noticed the problem doesn't apply to all subfolders so I am currently narrowing down the culprit

            EDIT: It's actually the other way round - All subfolders seem to be working fine except for one case... details will follow
            Last edited by gregid; 02-11-2016, 05:37 PM.

            Comment


              #7
              As much as my ego hurts to admit it you (roslja) were right to doubt my reading comprehension and point out it must be related to something else.

              So here is a case with an error:

              I have a custom library that uses the following:
              Code:
              namespace g3.NinjaScript.Utility
              The folder structure in Custom project I have as follows:
              Indicators/g3/Development

              By adding "New Indicator" to Development subsubfolder the new indicator namespace became:
              Code:
              namespace NinjaTrader.NinjaScript.Indicators.g3.Development
              Now in another indicator I had the following line:
              Code:
              _myList = g3.NinjaScript.Utility.Util.ParseInputList(IntervalList);
              But now after adding indicator to g3 folder it no longer recognizes g3 from my custom library instead g3 namespace is referring to "NinjaTrader.NinjaScript.Indicators.g3" where it cannot find any of my custom methods.

              So in the end it created conflicting namespaces with "NinjaTrader.NinjaScript.Indicators.g3" taking precedence and that was the reason for the compile error.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CortexZenUSA, Today, 12:53 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by CortexZenUSA, Today, 12:46 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by usazencortex, Today, 12:43 AM
              0 responses
              5 views
              0 likes
              Last Post usazencortex  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              168 responses
              2,265 views
              0 likes
              Last Post sidlercom80  
              Started by Barry Milan, Yesterday, 10:35 PM
              3 responses
              11 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X