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:	244
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:	244
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:	236
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 DannyP96, 05-18-2026, 02:38 PM
        1 response
        85 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        143 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        83 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        257 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        334 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X