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 funk10101, Today, 09:43 PM
        0 responses
        6 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        44 views
        0 likes
        Last Post bill2023  
        Started by yertle, Today, 08:38 AM
        6 responses
        26 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        24 views
        0 likes
        Last Post algospoke  
        Working...
        X