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.

    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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      77 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      45 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      27 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      62 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X