DisplayAttribute
Definition
Determines how the following declared property display on the NinjaTrader UI’s property grid.
The DisplayAttribute object is a general purpose attribute made available from the .NET Framework. The information on this page is written to demonstrate how you may use this object within NinjaScript conventions used with the NinjaTrader UI’s property grid (e.g., an indicator dialog). There are more methods and properties that you can learn about from MSDN’s DisplayAttribute Class which are NOT covered in this topic; as such there is NO guarantee they will work with the NinjaTrader UI’s property grids.
Syntax
[Display(Name=string)]
[Display(Description=string)]
[Display(GroupName=string)]
[Display(Order=int)]
The “Name” parameter MUST be unique for each property of a particular object. Sharing the same Name can have undesirable consequences on various features of the property grid.
Parameters
Tips:
- Multiple named parameters can be written separated by a comma during a single declaration as demonstrated in the example below.
- You may have noticed the default NinjaTrader types such as indicators or strategies use a ResourceType = typeof(Custom.Resource) property in the DisplayAttribute. This is done for localization purposes, so the default NinjaTrader UI translates to other supported international languages, but is not required for your custom NinjaScript types. The ResourceType property can be safely ignored and left out in your custom development.

