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

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 Stanfillirenfro, Today, 07:23 AM
1 response
4 views
0 likes
Last Post NinjaTrader_Gaby  
Started by cmtjoancolmenero, Yesterday, 03:58 PM
2 responses
22 views
0 likes
Last Post cmtjoancolmenero  
Started by olisav57, Yesterday, 07:39 PM
1 response
9 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by cocoescala, 10-12-2018, 11:02 PM
7 responses
944 views
0 likes
Last Post Jquiroz1975  
Started by oviejo, Today, 12:28 AM
1 response
12 views
0 likes
Last Post NinjaTrader_Gaby  
Working...
X