• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 tonynt, Today, 01:42 AM
        0 responses
        6 views
        0 likes
        Last Post tonynt
        by tonynt
         
        Started by NT-Roland, Yesterday, 04:36 PM
        0 responses
        3 views
        0 likes
        Last Post NT-Roland  
        Started by Newtrader101, Yesterday, 03:40 PM
        2 responses
        11 views
        0 likes
        Last Post Newtrader101  
        Started by Branpo, Yesterday, 02:58 PM
        2 responses
        12 views
        0 likes
        Last Post Branpo
        by Branpo
         
        Started by sdauteuil, Yesterday, 02:09 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X