NT8 - GUI namespace errors on fresh install with wizard-generated code

I’m getting persistent GUI namespace compilation errors in NinjaTrader 8 (latest version) even with completely wizard-generated indicators.

The errors are:

  • CS1513: The type or namespace name ‘Gui’ does not exist in the namespace ‘NinjaTrader.NinjaScript.Indicators.MyCustomIndicator’

This happens even when:

  • Using a fresh NT8 installation
  • Creating indicator through the wizard without ANY modifications
  • Just clicking through the wizard and generating

What I’ve tried:

  • Complete reinstall of NT8
  • Clearing all custom indicators
  • Remove NinjaScript Assemblies
  • Different indicator names
  • Creating strategies instead of indicators

The auto-generated code at the bottom seems to be the issue. It references ‘Gui’ without the full namespace path.

System: Windows 10, NT8 version 8.1.5.2

Has anyone experienced this? Is there a fix that doesn’t involve reinstalling Windows?

EDIT: This happens with EVERY indicator, even the simplest wizard-generated ones.

“ I’m getting persistent GUI namespace compilation errors in NinjaTrader 8 (latest version)…….. ……… System: Windows 10, NT8 version 8.1.5.2”

Can’t help you with coding stuff but just an observation in case it’s related/easily fixes: latest version is 8.1.6.3. If for any reason you want to be able to downgrade back to 8.1.5.2 you can download last prior version from website

FWIW I’ve been using .6 since end of last year and for my setup is stable

Good luck

1 Like

Hard to tell without being on the system and looking at things. But here are a couple of suggestions that you can try and see if one works. Hopefully, one of these will help.

  • Right click in your NinjaScript Editor window and go to References. Do you have all these entries? I’m guessing the fourth one is the relevant one for you.

  • See if replacing all instances of Gui with NinjaTrader.Gui fixes your problem.

  • Or alternately, assuming you already have the following “using” line at the top of your code, maybe remove the “Gui.” portion and see if that eliminates the error. For example, if you have “Gui.Tools.xxx”, then replace that with “Tools.xxx”.

using NinjaTrader.Gui;

Hope this helps.

1 Like