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

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:	107
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
    Chris L.NinjaTrader Customer Service

    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:	117
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:	110
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
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Brevo, Today, 01:45 AM
        0 responses
        6 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        3 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        241 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        6 views
        0 likes
        Last Post oviejo
        by oviejo
         
        Working...
        X