Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add custom properties fields to new bar type

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

    Add custom properties fields to new bar type

    I'm working a new bar type and wanted to add a couple of fields to the properties section when selecting a bar type.
    This is the code I was using and initializing in State.Defaults.

    [Display(Name="Time Mode", Order=1, GroupName="Parameters")]
    [NinjaScriptProperty]
    publicTimeModeTimeMode
    { get; set; }

    [Range(1, int.MaxValue)]
    [NinjaScriptProperty]
    [Display(Name="Period", Order=2, GroupName="Parameters")]
    publicintPeriod
    { get; set; }


    ​But I don't see these fields in the UI and the values are not set either. What am I missing?

    #2
    Hello admiralpanda,

    Unfortunately, custom properties cannot be added in this way.

    You can only rename and use existing properties.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Oh Okay. Thanks for the info. I've been stuck on this for an hour now.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      601 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      347 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      559 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      558 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X