Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

enumeration difference between 7 and 8

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

    enumeration difference between 7 and 8

    I am trying to initialize an enum in 8 but I am having difficulties. what is the change in 8.
    here is 7

    [Description("Pivot Type (Swing/ZigZag)")]
    [GridCategory("Pivot Type")]
    [Gui.Design.DisplayName("Pivot Type (Points/Percent)")]
    public NinjaTrader.Indicator.myEnum.eZigZagDeviation ZigZagType
    {
    get { return eZigZagType; }
    set { eZigZagType = value; }
    }

    here is 8

    [NinjaScriptProperty]
    [Display(Name = "Pivot Type (Swing/ZigZag)", Description = "", GroupName = "Pivot Type", Order = 3)]
    public NinjaTrader.Indicator.myEnum.eZigZagDeviation ZigZagType
    {
    get { return ePivotType; }
    set { ePivotType = value; }
    }

    I presume it is the Ninjatrader.Indicator line but what is the change?

    public NinjaTrader.Indicator.myEnum.eZigZagDeviation ZigZagType


    I did encapsulate in 7 and made my enum not global and I want to do this in 8

    #2
    Hello,

    Thank you for the post.

    As the namespaces have changed between NT7 and NT8, you would need to look at where you defined the enum and copy the namespace from there and replace the NT7 namespace.

    By default indicators in nt8 reside in NinjaTrader.NinjaScript.Indicators

    If the enum is defined inside of your indicator, you would need to use the namespace you see at the top of your indicator followed by the indicator name as you did with 7.

    Also from our conversation yesterday, if you plan to make a shared enum, rather than creating a separate indicator file with the enum as noted in my post from yesterday, you can use an Addon type if you want to add the enum into a separate file.

    I look forward to being of further assistance.

    Comment


      #3
      Thankyou I understand now just copy the namespace

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      637 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
      569 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