Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Browsable(false) Property

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

    Browsable(false) Property

    if the help guide is states that browsable (false) in properties won't show in the UI

    Click image for larger version

Name:	2022-10-14 17_28_42-NinjaTrader 8.png
Views:	225
Size:	7.1 KB
ID:	1219493

    but the property is still shown in the UI. Have I misunderstood?

    #2
    Hi dibDab, thanks for posting. The property also needs the [NinjaScriptProperty] tag. It should look like this:

    Code:
    [NinjaScriptProperty]
    [Browsable(false)]
    public bool MyBool
    {get; set;}​


    Kind regards,
    -ChrisL

    Comment


      #3
      I think I need to spend time understanding the use of properties, where is a good place to start?

      Click image for larger version

Name:	2022-10-15 06_54_33-NinjaScript Editor - Strategy - DonChi100.png
Views:	229
Size:	3.0 KB
ID:	1219594
      class member declaration expected

      also I've added a plot using AddPlot(Brushes.Goldenrod,"Plot1");

      Click image for larger version

Name:	2022-10-15 07_00_26-NinjaScript Editor - Strategy - DonChi100.png
Views:	221
Size:	4.6 KB
ID:	1219595

      and it still shows in the UI

      Comment


        #4
        Hi dibDab, thanks for the follow up. The properties might not be placed in the right location. They need to be placed on the class level and not within any method or function. I attached a sample strategy that is working on my end. Set ArePlotsConfigurable = false; in State.DataLoaded to remove the Plot configuration as well.

        Kind regards.
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X