Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Basic use of the Optimizer

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

    Basic use of the Optimizer

    I’m very interested in the Optimizing capability but being new to NT I would appreciate some usage instructions. To give an actual example, using the strategy analyzer wizard, I built a moving average crossover strategy to guide buying and selling and from some reading I’ve done in the NT forum (whether misunderstood or not) I have the impression, that I should be able to optimize the coding(?) by being able to set the ranges for the periods of both of the MAs at the same time. Is that correct or not or can only one of those ranges be set at a time? How many ranges of parameters be set at one time?

    If that is correct how can I specifically have access to setting the ranges for both of them at the same time of the Optimize since all I see are a setting for one of those periods at one time and I’m not even sure which of the two periods I should be entering with the 1;1;1 representing the range and step.

    #2
    rsuess1, if your strategy's parameters are coded as user defined inputs you can optimize those in the Strategy Analyzer section in NinjaTrader -



    There's no hard set limit on the number of parameters you can optimize together, but please keep in mind the more you optimize the longer it will take to find the best solution and the higher the risk becomes to 'fit' the strategy to your chart history.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      But my problem, if I haven't misunderstood something, is that even with only the 2 periods involved with 2 moving averages I only see a display that calls for 1 of them to be varied; that is 1:1;1 which if I am doing it correctly, would only allow me to change a scripted 5 period to a range of 3 to 8 or whatever might be reasonable and I don't see any opportunity to change the range of the 21 period MA to 18 to 35 if I so chose at the same time.

      Comment


        #4
        rsuess1, this would then mean the user defined inputs in your strategy are not setup correctly - did you set it up via the Strategy Wizard or code directly?



        BertrandNinjaTrader Customer Service

        Comment


          #5
          Sorry for not answering your question but I was trying to digest the material you presented. That did help and the answer to your question was that at this stage, I'm trying to learn how to use the Wizard to set up the appropriate User Defined Inputs and Variables. But at least I now see the kind of wizard-produced coding, involving in the case of the MA CrossOver strategy that had the Fast and Slow user defined variables - is that the correct terminology? And I was able to run an Optimization utilizing that.

          What is the difference between User Defined Input and User Defined Variables?

          But it still isn't clear at my current level to understand how to actually enter this kind of variable in the strategies I might want to utilize with various indicators that have more factors to take into account. Is there any repository for more examples of this process?

          Thank you.

          Comment


            #6
            Great you got it figured out - those would user inputs, as they would show up as parameters you can enter valuels for 'on the fly' when starting / backtesting / optimizing the strategy.

            A user variable in the wizard acts like a placeholder if you want to store a value for calculating with it for example in another condition, this would be only local for the current script you're working in.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Sorry about the delay in getting back but I've been trying to puzzle this subject from the available Help screens and your statement:

              "A user variable in the wizard acts like a placeholder if you want to store a value for calculating with it for example in another condition, this would be only local for the current script you're working in."

              possibly due to unfamiliarity with programming, doesn't make sense to me. I'm not disputing its accuracy but I just don't understand it in relation to using the Wizard. Where in the Wizard are User Defined Variables (or User Defined Inputs) placed. Can you give me any basic examples?

              Comment


                #8
                For example, in Set1 of your conditions you check for a crossover of a fast and slow MA - if this happens you set user variable 0 to a value of 1 - now in Set 2 you can chech off the value of this user variable in other conditions and therefore you can easily link those sets together logically.
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by warreng86, 11-10-2020, 02:04 PM
                6 responses
                1,357 views
                0 likes
                Last Post mathewlo  
                Started by Perr0Grande, Today, 08:16 PM
                0 responses
                3 views
                0 likes
                Last Post Perr0Grande  
                Started by elderan, Today, 08:03 PM
                0 responses
                5 views
                0 likes
                Last Post elderan
                by elderan
                 
                Started by algospoke, Today, 06:40 PM
                0 responses
                10 views
                0 likes
                Last Post algospoke  
                Started by maybeimnotrader, Today, 05:46 PM
                0 responses
                14 views
                0 likes
                Last Post maybeimnotrader  
                Working...
                X