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

Nested Properties

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

    Nested Properties

    If an indicator/strategy is using a nested indicator, is there any way to add the properties of that nested indicator to the current ninjascript object without manually adding a new property? Ideally these would be in a new nested category.

    Could a TypeConverter be used to add a property vs the normal use of removing properties?

    For trivial cases, it is obviously easy enough to just add a property. I am more interested for a larger implementations and scenarios where you might want to add something to try it, and adding all the extra code for properties is rather time consuming, especially if you eventually throw it out.

    #2
    Hello aslane,

    Thank you for your post.

    One of my colleagues suggested exposing a public property in the hosted indicator and accessing that property as needed, but was unsure if that would work with your use case here - generally you would need to add the properties manually so they may be passed to the hosted indicator. If that isn't what you're looking for, can you clarify? It may just be something that would be unsupported.

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      I have made some progress on getting something like this working. The one item that is not working so far is getting a nested property to be optimizable in the strategy analyzer. The properties are marked NinjaScriptProperty attributes, but only show up as normal properties in the optimizer.

      The attached simple strat example shows the issue with a simple boiled down example. The strat defines a simple class NestedProps with two properties, and the strat has two properties of type NestedProp. Everything seems to work ok, except for the inputs not being optimizable.

      Am I missing something?

      This may not be officially supported, but please have a look at with development as I suspect this may be reasonably easy to enable, and it would open up some really interesting possibilities.
      Attached Files

      Comment


        #4
        Hello aslane,

        Thank you for your reply.

        As this would be unsupported, I have opened a feature request on your behalf to consider supporting nested properties with optimizations. The development team will see this request, but as with other feature requests we cannot offer an ETA or any promise of fulfillment. This request is being tracked under the number SFT-5085.

        If implemented, it will be noted in the Release Notes page of the Help Guide.

        Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

        Please let us know if we may be of further assistance to you.

        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Well it is possible, but the hoops to jump thru make you want to switch platforms.
          Attached Files

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GussJ, 03-04-2020, 03:11 PM
          11 responses
          3,229 views
          0 likes
          Last Post xiinteractive  
          Started by andrewtrades, Today, 04:57 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          7 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          441 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          12 views
          0 likes
          Last Post FAQtrader  
          Working...
          X