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

hiding output properties

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

    hiding output properties

    Hi, I have a need to hide some input and output properties based on some input properties. I mastered the Dynamic Properties to control the visibility of the input properties using IndicatorBaseConverter.
    Code:
    public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attrs)
    {[INDENT]PropertyDescriptorCollection propertyDescriptorCollection = ...[/INDENT]
     }
    ​
    Is there a way to control the output properties (exposed public [Browsable(false)][XmlIgnore] public Series<double>...)?

    #2
    Hello Shai Samuel,

    Thank you for your reply.

    What is the intended use case here? If they're not user inputs we wouldn't expect them to show up in the UI. Do you mean that you want that public series to not be public based on user input?

    If you mean you want to dynamically change access modifiers on a property or attributes on a property, that would not be possible, however, you could simply set that series to null if you're not going to use it based on user input.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thank you Kate,

      The indicator expose a few datasets using public series. I would like have different datasets exposed, based on the input params. For example, if an input param request HTF (bool UseHTF), I would like to expose the relevant HigherTimeFrame dataset that the indicator calculate. If the UseHTF is false, I would like these data sets not to be exposed.

      This is something which should be set based on the input params, so it will not change dynamically during OnUpdate, but only at the loading phase of the indicator.

      If this is not possible, it's OK.

      Comment


        #4
        Hello Shai Samuel,

        Thank you for your reply.

        Changing whether the series is public or private based on user input would be changing it dynamically and would not be possible. You'd just have to set any unused series to null.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        1 view
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        238 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        383 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        1 view
        0 likes
        Last Post oviejo
        by oviejo
         
        Started by pechtri, 06-22-2023, 02:31 AM
        10 responses
        125 views
        0 likes
        Last Post Leeroy_Jenkins  
        Working...
        X