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 mattbsea, Today, 05:44 PM
      0 responses
      2 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      31 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Started by tkaboris, Today, 05:13 PM
      0 responses
      2 views
      0 likes
      Last Post tkaboris  
      Started by GussJ, 03-04-2020, 03:11 PM
      16 responses
      3,281 views
      0 likes
      Last Post Leafcutter  
      Started by WHICKED, Today, 12:45 PM
      2 responses
      20 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Working...
      X