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 Haiasi, Today, 06:53 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by ScottWalsh, Today, 06:52 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by ScottW, Today, 06:09 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by ftsc2022, 10-25-2022, 12:03 PM
      5 responses
      256 views
      0 likes
      Last Post KeyonMatthews  
      Started by Board game geek, 10-29-2023, 12:00 PM
      14 responses
      244 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Working...
      X