When Zorro finishes the first walk I got the "Invalid optimize parameters" error without any number.
When I tested my strategy functions individually I got no error messages. I tried to replace one parameter by AI and this fixed the issue, but I removed the AI and inserted the parameter again and the error message returned.

After the error (when I click retry) message it show:
Selected p16[1] = 0 => -34028234663852886000000

I verified I'm not calling optimize conditionally and I'm not changing the BarPeriod value or even TimeFrame.

What this error message means?

What I found was:
Error 040: Inconsistent optimize calls

But I think that's not the error.

My script have nearly to 300 lines.