Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimization show up issues

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

    Optimization show up issues

    I having some of the StrategyBaseConverter to help me display some properties based on some condition.

    For example, if we choose SMA, then it will show up another properties and then user can fill up.

    However, I noticed that in the optimization, the value didnt show up.
    Once i Command out the StrategyBaseConverter, it show up again.

    Any idea help me to solve this ??

    Or else, can you give me the code to access the strategy analyzer -> backtest type --> optimization so that i can make a condition in my StrategyBaseConverter there

    #2
    Hello cincai,

    Thanks for the post.

    Before I try this on my end I wanted to clarify, did you mean "once I Command comment out" as in removing the StrategyBaseConverter from your strategy class and returning to a standard strategy?

    Also what specifically is not showing up? The properties or the values of those properties, or the whole strategy?

    I am not certain if the backtest category can be used from the base converter, you can certainly check if that's going to help with your specific use case. You can detect the optimization like the following:

    Code:
    if (State == State.Configure)
    {
        if (Category == Category.Backtest)
          Print("Strategy is running a regular backtest ");
       else if (Category == Category.Optimize)
          Print("Strategy is running an optimization ");
       else if (Category == Category.WalkForward)
          Print("Strategy is running walk forward optimization");
       else if (Category == Category.MultiObjective)
          Print("Strategy is running a multi objective optimization ");
       else if (Category == Category.NinjaScript)
          Print("Strategy is running on an account from a chart/strategies tab ");
    }
    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks, it work

      Comment


        #4
        Can i know is that
        Category == Category.Backtest only can used in strategy ??

        Because I used it is indicator, and it appear error to me

        Comment


          #5
          Hello cincai,

          That's correct, that is a strategy only property. Only strategies can be selected in the analyzer.


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

          Comment


            #6
            HI
            Attached screenshot that shows optimised strategy of a main strategy, as you can see the start time and stop time looks weird, im based in the UK , why does it appear like this? 676? 1889?
            Attached Files

            Comment


              #7
              THIS must be your strategy propeties region there to declare the variable is wrong.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Papercut110, Today, 03:17 AM
              0 responses
              3 views
              0 likes
              Last Post Papercut110  
              Started by max333, Today, 02:22 AM
              2 responses
              6 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by mnbowursw, Today, 02:59 AM
              0 responses
              2 views
              0 likes
              Last Post mnbowursw  
              Started by ndimtyry, Today, 02:50 AM
              0 responses
              1 view
              0 likes
              Last Post ndimtyry  
              Started by cincai, Today, 12:55 AM
              3 responses
              11 views
              0 likes
              Last Post cincai
              by cincai
               
              Working...
              X