Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

It appears that the Optimizer runs one extra iteration than is necessary

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

    It appears that the Optimizer runs one extra iteration than is necessary

    Hello

    I am running 8.0.20.0 64-bit

    It appears that the Optimizer runs one extra iteration than is necessary, i.e. it duplicates one of the iterations.

    This can be seen by doing the following:

    1) Modify the SampleMACrossover Strategy by adding the following code to State.DataLoaded: Print(Fast);
    2) In the Optimizer, select a range for the Fast Property, and Run the Optimizer
    3) In the Output window you will see a second iteration for one of the Fast Properties

    I have not reviewed this close enough to see whether or not it skews the results for the run that is duplicated.

    This does not affect me since I use StreamWriter to record Optimizer data, which I import to other software where duplicate records are removed...just thought I'd report this to the team.

    #2
    Hello Zigfried,

    Thank you for your post.

    From looking at the code for the Optimizer, it appears that this would be expected - it will get information from the strategy before running the iteration, during which the strategy reaches State==State.SetDefaults, but does not actually complete the iteration if it's already completed the required number of iterations.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello Kate

      I'm not sure what you mean by a "complete" iteration, but if you move the Print statement to OnBarUpdate and copy the output to another program like a spreadsheet, you can sort/count records and see that the it runs all the way through the OnBarUpdate section for the duplicated iteration. For other team members like me who are recording the trades to file, the duplicate trades need to be deleted. Whether or not the Optimizer actually uses these trades...I guess you are telling me that it doesn't.

      Thanks!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Walter2011, Today, 08:27 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by arangocj, Today, 06:28 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by BIllblast, Today, 08:03 AM
      2 responses
      9 views
      0 likes
      Last Post BIllblast  
      Started by jerryblack, Yesterday, 05:04 PM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by mattage86, Today, 06:43 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_RyanS  
      Working...
      X