Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error without an indicator name

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

    Error without an indicator name

    Ninja 8 Update 11

    One of my customers is reporting an error. I don't know if it's my indicator causing this error. But what intrigues me is that the error is being reported with a blank indicator name. I'm not quite clear how an indicator could not have a name.

    Do you have to explicitly set a 'Name' for the indicator to have a name, or would you have to say ' Name = "" ' in order to get rid of the name?
    Attached Files
    Last edited by bubblegum; 06-11-2016, 02:28 AM.

    #2
    So I wrote some code to specifically generate a 'Collection was modified' error, and it doesn't generate an error! grrrrrrrr...

    Code:
    			if ( Math.IEEERemainder(CurrentBar, 2) == 0 )
    			{
    				Rectangle myRect = Draw.Rectangle(this, "hello:"+CurrentBar.ToString(), 5, High[0], 0, Low[0], Brushes.Blue);
    			}
    			else
    			{
    				Rectangle myRect = Draw.Rectangle(this, "goodbye:"+CurrentBar.ToString(), 5, High[0], 0, Low[0], Brushes.DarkMagenta);
    			}
    			
    			if ( CurrentBar == 100)
    			{
    				foreach (IDrawingTool rectangle in DrawObjects)
    				{
    					if (rectangle.Tag.StartsWith("hello:"))
    					{
    						RemoveDrawObject(rectangle.Tag);
    					}
    				}
    			}

    Comment


      #3
      Hello bubblegum,

      Thank you for writing in.

      The Name property would need to be explicitly set to "" (or string.Empty) in order to show up blank as shown in the screenshot provided.

      If a Name is not specified at all (the Name property deleted entirely from State.SetDefaults, for example), the name will take on the class name of the indicator.

      If you have specified a Name for the indicator, the customer may be referring to a different indicator in this case.

      Are you able to confirm if the customer is referring to your indicator in particular?
      Zachary G.NinjaTrader Customer Service

      Comment


        #4
        Thanks. I'm pretty sure it's not my indicators. I do set the Name in State.SetDefaults. And I forced an error in my indicator and it shows the error in the NT log/trace with the correct name. Strange that someone is setting Name = "" !

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        579 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 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
        554 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