Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Convert from NT7 to NT 8

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

    Convert from NT7 to NT 8

    Hi

    I'm trying to convert an indicator from NT7 to NT8.

    But I get an error that "Type or name 'GridCategory' hasn't been found, (missing a 'using'..)" and also "Type or name 'GridCategoryAttribute' hasn't been found, (missing a 'using'..)"
    and 'Design' is not know in Ninjatrader.Gui.

    [Description("")]
    [GridCategory("xxx")]
    [Gui.Design.DisplayName("xxx")]
    public bool Rtts
    {
    get { return rtts; }
    set { rtts = value; }
    }

    this is my Using declarations

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using NinjaTrader.NinjaScript.DrawingTools;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Data;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Gui.Tools;
    using SharpDX.Direct2D1;
    using SharpDX;
    using SharpDX.DirectWrite;

    Best regards
    The_Wiz

    #2
    Convert from NT7 to NT8 another issue

    Hi

    I have yet another issue. The following piece of code can not run in NT8

    {
    get { return NinjaTrader.Gui.Design.SerializableFont.ToString(l abelFont); }
    set { labelFont = NinjaTrader.Gui.Design.SerializableFont.FromString (value); }
    }

    What would I have to use instead?

    Best regards
    The_Wiz

    Comment


      #3
      Thank you for your questions The_Wiz. It may increase the responsiveness of the community to these questions if you could wrap code with [code][/code] tags in the future. We are always happy to help in any way we can.

      As you have noticed, many of the tags used between NinjaTrader 7 and NinjaTrader 8 have changed. I would recommend reviewing code from an existing indicator or strategy, such as the MACD, and seeing which tags that code uses for similar properties. Here is an example.

      Code:
      [FONT=Courier New]
      [Range(1, int.MaxValue), NinjaScriptProperty]
      [Display(ResourceType = typeof(Custom.Resource), Name = "Fast", GroupName = "NinjaScriptParameters", Order = 0)]
      public int Fast
      { get; set; }[/FONT]
      With this information I would recommend you try refactoring like this

      Code:
      [FONT=Courier New]
      [NinjaScriptProperty]
      [Display(ResourceType = typeof(Custom.Resource), Name = "xxx", GroupName = "xxx")]
      public bool Rtts
      { get; set; }[/FONT]
      To your second question, please review the "Setting Default UI Property Grid values" section here. We will be happy to help with any questions that come up.
      Jessica P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      636 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      568 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      571 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X