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:	104
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:	114
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:	107
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 terofs, Today, 04:18 PM
        0 responses
        5 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by nandhumca, Today, 03:41 PM
        0 responses
        4 views
        0 likes
        Last Post nandhumca  
        Started by The_Sec, Today, 03:37 PM
        0 responses
        3 views
        0 likes
        Last Post The_Sec
        by The_Sec
         
        Started by GwFutures1988, Today, 02:48 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        6 responses
        33 views
        0 likes
        Last Post ScottWalsh  
        Working...
        X