Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Duplicate Optimization Tests

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

    Duplicate Optimization Tests

    It seems like the exact same optimization/test is run and output 9 times in the attached example.
    Note: The 4 parameters to be optimized are exactly the same in groups of 9.
    Depending on the number of parameters to be optimized, the number of duplications seems to vary.

    See Attached Screen Dump...NT-Optimize-Bug1.Jpg.

    Thanks.
    Attached Files

    #2
    Hello,

    Can you please check to see if you can reproduce the duplication with the SampleMAStrat using all the same settings.

    Comment


      #3
      Optimization Loop Problems

      * I copied the reported bad script (Strategy Wizard Generated 'AcmStrPPO3') to 'AcmStrTestPPO3' and ONLY CHANGED the logic from using (>= and >) to using CrossAbove and CrossBelow.
      This optimization Had No Duplicates.
      Screen Dumps:
      * NT-Optimization-Bug1.Jpg - 9 duplicate optimization tests
      * NT-Optimization-Bug1A.Jpg - Results screen with CrossAbove/Below that worked
      * NT-Optimization-Bug1B.Jpg - Code difference using CrossAbove vs. >=
      * NT-Optimization-Bug1C.Jpg - Tried to Limit Long Entry by X Price
      * NT-Optimization-Bug1D.Jpg - Cannot get code to say 'Open[0] - WaitForPrice
      ******
      QUESTIONS:
      1) Why would CrossAbove & CrossBelow work when >= and < don't?
      2) When you calculate/chart buys and sells at the Open, what price to you use? Shouldn't either the Sell be .25 lower than the Open, or the Buy .25 higher than the Open? Which price is listed on the Range Chart at the Open? Do I need to always need to use a slippage of 1/2 of a tick to make up for this?
      3) I tried to change the logic from a Market order at the open, to where it would wait X ticks before entry. Long...Open[0] - 1 tick. Short...Open[0] + 1 tick. In the actual code, I used Price (.25, .50, etc.).
      In the wizard, it Always puts in a plus '+' sign for the offset...see the screen dumps 1C and 1D.
      How should this be handled?
      4) I tried to fix question #3 by inventing 2 Price Offset variables 'WaitForPriceLongs' and 'WaitForPriceShorts'. I would like the LONG wait value to go from 0, -.25, -.50, etc. but could not get any 'For Loop' values and/or increments to go negative.
      How should this be handled?
      5) I tried to edit the line 'Open[0] + WaitForPrice' by changing the plus sign to a minus sign, and NT just changed the whole order to something like "EnterLongLimit( DefaultQty, 0);
      Is there a way to get the negative values without unlocking the code?
      6) When writing this last logic using Limit orders, I did not realize that I had to close any open orders first. I had to erase all code just to insert the ExitShort or ExitLong before the Enter...Limit order.
      It would be nice to have a way to move the orders up/down and change the order of the code without having to re-code everything.
      Is there a way around this?

      ** One other note. When I had the 9 duplicate optimization/tests, I could not Select anything except the 1st test listed on the page. When I changed to CrossAbove/CrossBelow, it worked perfect. The code also runs a lot slower using >= and < instead of CrossAbove/CrossBelow.
      Attached Files

      Comment


        #4
        Wanted to let you know that we recieved your response and I will be working with Austin who is one of our strategy/ninjascript support team members who will be in the office later today.

        Thank you for your patience.

        Comment


          #5
          I worked with Austin and we need to take a look at your code. Can you please send a note to support at ninjatrader dot com and put ATTN Brett in the subject line. Please goto Control Center->File->Utilities->Export NinjaScript and export the strategy that is causing the duplication and attach it to the email so that we may test it on our end.

          I look forward to assisting you further.

          Comment


            #6
            I am also getting duplicate test results. I have seen this in both 6.5 and 7.0. The duplicated test results only occur when the value of one of my parameters is 0 (zero). There is logic in my code which treats a parameter setting of zero as a switch and disables the use of that parameter when it is zero.

            I've attached a Excel screen capture showing the duplicated values. The last 5 columns are the parameters settings used in optimizing.

            Greg
            The Trading Mantis
            NinjaTrader Ecosystem Vendor - The Trading Mantis

            Comment


              #7
              Hello,

              Thank you for your forum post.

              I did not receive an attachment on the forum. Could you please re attach.

              I look forward to assisting you further.

              Comment


                #8
                Reply to Gregschr and Brett

                I reported this with screen dumps and the code several months ago. I don't believe anything has been done on it. I don't see any resolution in the history. Sorry.

                Comment


                  #9
                  Here is the attachment (I hope).

                  Also one other observation. The duplicate results showing the zero parameter also show up even when the optimization range does not include zero (e.g. range is 50 to 100 in steps of 5).
                  Attached Files
                  The Trading Mantis
                  NinjaTrader Ecosystem Vendor - The Trading Mantis

                  Comment


                    #10
                    Hello,

                    Thanks for attaching.

                    We would need you to send in your code that is doing this so that we can get a reprodible scenario to get this resolved. This does not occur for me with the SampleMACrossOver.

                    Please send the strategy that is causing this to support at ninjatrader dot com ATTN: Brett so that I may test this on my side, see if I see the same and work with development to look into this.

                    Thank You.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by pechtri, 06-22-2023, 02:31 AM
                    9 responses
                    122 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by frankthearm, 04-18-2024, 09:08 AM
                    16 responses
                    65 views
                    0 likes
                    Last Post NinjaTrader_Clayton  
                    Started by habeebft, Today, 01:18 PM
                    1 response
                    5 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by benmarkal, Today, 12:52 PM
                    2 responses
                    13 views
                    0 likes
                    Last Post benmarkal  
                    Started by f.saeidi, Today, 01:38 PM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Working...
                    X