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

TypeConverter in Optimization

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

    TypeConverter in Optimization

    I am aware of the type converter sample, and have used portions of it to hide/show properties. My question is how can this be applied when in the optimizer? For example, if I have a bool property, I want to show other properties if it is set to True or Optimize.

    #2
    Hello aslane,

    Thank you for the post.

    I wanted to clarify, are you saying that currently the type converter is not working at all in just the optimization window or are you asking how to watch for both true/Optimize?

    Do you also have a sample of what you made that I can take a look at? It looks like our strategy sample in the help guide only contains the type converter but is not ready to test for this situation, if you have an existing sample that would be helpful so I don't need to recreate this over again.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      how to watch for both true/Optimize?
      Yes.

      I do not have simple example, but just create simple strat with bool that hides one other prop.

      Comment


        #4
        Hello aslane,

        Thank you for the reply.

        I will test this when I find time to recreate what you described and provide any information I uncover to development for review.

        Please let me know if I may be of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          As far as I can tell, this does not work at all in the optimizer (works fine in Backtest). If triggering property starts out false, the other property is removed as expected. However, when you flip the boolean to True or Optimize, the second hidden property is not displayed. The triggering property does have the RefreshProperties attribute specified. I'll see if I can provide a basic example.

          Comment


            #6
            Attached is simple example that shows issue.
            Attached Files

            Comment


              #7
              Hello aslane,

              Thank you for the reply,

              I was able to form a sample earlier in the day and have already reported this. I will reply back here if I receive more details surrounding this situation.

              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                Hello aslane,

                I wanted to follow up as I received some further input from QA here. It looks like this is to be expected based on how the optimizer property grid works. In the situation where you have NinjaScriptProperty attribute applied to the property that will disable the custom type converter in this use case. To still utilize the type converter in the optimizer would require removing the NinjaScriptProperty attribute from that property specifically.

                A work around could be to make an extra bool property for the purpose of toggling the others, this property would not be optimized and is strictly to control the properties. The hiding works as long as the property which toggles is not an optimization property. I realize this would not cover all cases if you have more than one toggle that could be problematic. I will put in a feature request to expand this area.

                I look forward to being of further assistance.

                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Thanks that makes sense. However, this does not really help in the general case as you explain. I already do use bools to enable the groups, but those bools need to be optimizable also.For example, you might have a group of items that can all be turned on/off together in different combinations. This is really an advanced item, but when building large frameworks, this is really required in order to increase the usability for the end user. Please add the feature request.

                  Comment


                    #10
                    Hello, I was curious, has the status of this challenge changed at all? The ability to show / hide numerous properties in my strategies has really made it cleaner / easier for me to work during normal strategy use, but when I want to work on Optimization in the Strategy Analyzer the inability to show / hide properties makes things a bit of a mess.

                    Thanks!

                    Comment


                      #11
                      Hello mps227,

                      This is currently still the case, the optimizer is not set up to utilize the custom type converters/property descriptors like a standard property grid would use.
                      JesseNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Aviram Y, Today, 05:29 AM
                      0 responses
                      1 view
                      0 likes
                      Last Post Aviram Y  
                      Started by quantismo, 04-17-2024, 05:13 PM
                      3 responses
                      25 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by ScottWalsh, 04-16-2024, 04:29 PM
                      7 responses
                      34 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by cls71, Today, 04:45 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post cls71
                      by cls71
                       
                      Started by mjairg, 07-20-2023, 11:57 PM
                      3 responses
                      216 views
                      1 like
                      Last Post PaulMohn  
                      Working...
                      X