Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tip: What do the Attributes on the Properties do.

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

    Tip: What do the Attributes on the Properties do.

    When you create a new indicator or strategy you are able to create your own properties. A few people have emailed me asking for help with these.
    Ninja Trader uses the .NET PropertyGrid to present them to the Trader. A nice & very flexible approach.
    This means you can use the .NET attributes to customise the way your properties are displayed. These attributes are documented in System.ComponentModel.



    To save you time, some of the more useful ones are:-
    • [Browsable(bool)] - To show property or not
    • [ReadOnly(bool)] - Trader can view but not change the property
    • [Category(string)] - Lets you group properties together. Changing this in pre.7.0 prevents the property from being displayed on the Plot. It also stops other Ninja Components like Market Analyzer from changing this property.
    • [Description(string)] - Property description, which can be a hint
    • [DisplayName(string)] - Display Name property
    This is not a complete list by any means.
    My favorite lets you add your own Property Types, (ie Brushes & Files)complete with extra dialog boxes to set them by using the [TypeConverter(typeof(MyCustomClassConverter))]
    (This exceeded the char limit so I'll make it a separate post)

Latest Posts

Collapse

Topics Statistics Last Post
Started by SalmaTrader, 07-07-2026, 10:26 PM
0 responses
29 views
0 likes
Last Post SalmaTrader  
Started by CarlTrading, 07-05-2026, 01:16 PM
0 responses
17 views
0 likes
Last Post CarlTrading  
Started by CaptainJack, 06-17-2026, 10:32 AM
0 responses
9 views
0 likes
Last Post CaptainJack  
Started by kinfxhk, 06-17-2026, 04:15 AM
0 responses
15 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 06-17-2026, 04:06 AM
0 responses
18 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Working...
X