Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exporting Log Reads 'Indicators' does not exist in the namespace 'NinjaTrader.Custom'

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

    Exporting Log Reads 'Indicators' does not exist in the namespace 'NinjaTrader.Custom'

    Hi there, I am attempting to export a strategy I wrote. It uses files in directories
    Custom\Indicators,
    Custom\Strategies, and
    Custom\Strategies\Common.

    I was having some issues when \Common was on the same hierarchical level as Indicators and Strategies, but I fixed that (I think) when I made \Common a sub-folder of \Strategies. I am now facing the error below. I am using one actual indicator from \Indicators: Swing() (NT8 stock, not modified or anything crazy). The error mentions WStop.cs, but I have that added/checked in my Export NinjaScript window. Also, I've tried checking and un-checking "Export as compiled assembly" even though I'm not exactly sure what that does.

    Error compiling export assembly: c:\Users\Nathan\Documents\NinjaTrader 8\bin\Custom\Strategies\Argyle\WStop.cs(1,26) : error CS0234: The type or namespace name 'Indicators' does not exist in the namespace 'NinjaTrader.Custom' (are you missing an assembly reference?)
    I'm kind of at a loss for how to approach this one. Can you please advise how I can fix this, or if more information is needed, then please let me know. Thank you.

    Any help or direction to the solving of this mystery would be greatly appreciated. Thank you.

    Nathan.

    #2
    Hello NateG0310.

    Thanks for your post.

    What line of code is causing the compile error?

    It looks like you are trying to reference something from the NinjaTrader.Custom namespace, but this would not be used for NinjaScripts.

    Did you mean to reference the NinjaTrader.NinjaScript.Indicators namespace or a sub-namespace?

    Namespaces (C# educational resource) - https://www.tutorialspoint.com/cshar...namespaces.htm

    We look forward to assitsing.

    Comment


      #3
      Hi Jim,
      Thank you for your reply. Everything compiles just fine inside both Visual Studio and NinjaScript Editor. That's the confusing part.
      I just figured it out (thanks to your direction). Anything with "NinjaTrader.Custom" was causing an issue. I went and made sure all of my strategies namespaces read "NinjaTrader.NinjaScript.Strategies"
      Once I got through with that, I would still get the error I quoted in my initial post. As it turns out, I had "using NinjaTrader.Custom" at the beginning of many of my strategies. So after I changed my namespaces, that line actually greyed out... indicating it was kind of doing nothing... but just having that line in there was enough to upset the export gods. I deleted that line from several files, and all works perfectly. Just detailing this incase it helps someone else in the future, and if you have any comments on this, Jim, I would love to hear just for the sake of learning. Thanks again for your direction! You've alleviated much frustration!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      60 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      39 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      21 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      23 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      51 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X