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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      174 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      330 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      252 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      356 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      183 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X