No trades open during strategy optimization - page 2

 
Alain Verleyen #: Do I understand correctly ? You are saying that the above code when optimized (custom max), should (could ?) return different values ? If yes, in what circumstances ? Because I can't reproduce it. Maybe I misunderstood your point.

Yes, but I not always. I don't know the exact conditions for it to be recreated.

All I know is that it happened to me often on both MT4 and MT5 in the past, until I started making sure to initialise at runtime instead of only declaratively.

EDIT: It also sometimes happened on Indicators when they reload on a chart due to a recompile. Again, not always, but sometimes.

 
Fernando Carreiro #:

Yes, but I not always. I don't know the exact conditions for it to be recreated.

All I know is that it happened to me often on both MT4 and MT5 in the past, until I started making sure to initialise at runtime instead of only declaratively.

EDIT: It also sometimes happened on Indicators when they reload on a chart due to a recompile. Again, not always, but sometimes.

Ok. In case you get more information to reproduce it, please contact me, or post here. Thank you.
 
Enrique Dangeroux #:

It is not what he meant indeed, hence the reason for me to delete my post. You are fast and beat me to it.