Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 TheWhiteDragon, 01-21-2019, 12:44 PM
      4 responses
      543 views
      0 likes
      Last Post PaulMohn  
      Started by GLFX005, Today, 03:23 AM
      0 responses
      3 views
      0 likes
      Last Post GLFX005
      by GLFX005
       
      Started by XXtrader, Yesterday, 11:30 PM
      2 responses
      12 views
      0 likes
      Last Post XXtrader  
      Started by Waxavi, Today, 02:10 AM
      0 responses
      7 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by TradeForge, Today, 02:09 AM
      0 responses
      14 views
      0 likes
      Last Post TradeForge  
      Working...
      X