Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

incorrect parameter values in optimization

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

    incorrect parameter values in optimization

    I am having a hard time to understand the results of strategy optimization.
    I have a strategy which has four parameters and I set optimize against the fourth parameter, which is integer type, with 10:20 step 2.

    see the results in attached image file.
    Click image for larger version

Name:	ninja.jpg
Views:	1
Size:	135.9 KB
ID:	903296

    why does the parameters show the same value? Shouldn't we expect to have the fourth parameter of 10, 12, ... 20, in stead of the same value of 20?
    Last edited by rcfcu2000; 09-11-2015, 05:29 PM.

    #2
    Hello rcfcu2000,

    Thank you for your note.

    Are you optimizing the Data Series as well? Can you provide a screenshot of the settings used in the Strategy Analyzer?

    Comment


      #3
      no, I did not optimize data series.

      The settings is attached in the image:

      Click image for larger version

Name:	ninja-2.jpg
Views:	1
Size:	265.7 KB
ID:	874566

      Comment


        #4
        Hello,

        Thank you for the reply.

        I am unsure based on the image if this was or was not optimized, it could be that the 10 best results are all just included 20 as the best result because it was based on what happened.

        Have you tried to increase the number of kept results to see if this changes or if other results include a different value? I would suggest trying this first, maybe 100 or more results just to check if the value ever changes. Another way to test would be to put a print in OnBarUpdate of the value of that int. Run the optimization and view the output, if the value has changed it is being optimized, otherwise if it is always 20 that would provide an answer to what is happening.

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

        Comment


          #5
          Jesse, thanks for looking into this problem.

          I figured out what is wrong with the code. I used private static variables for the internal parameters, I think static variables has a side effect such that the values was populated for all the threads.

          I removed the static keyword, and it is working fine now.

          Comment


            #6
            Hello,

            Thank you for the reply.

            Yes that would definitely cause an issue with the general structure of NinjaScript properties. I am glad it was just a modifier or easy resolution.

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

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            59 views
            0 likes
            Last Post DynamicTest  
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            36 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            7 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            21 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            10 views
            0 likes
            Last Post cre8able  
            Working...
            X