My script gives
Error 111: Crash in script: compramosSpread();

This error only happens after having run an optimization, with the "Train" option and then clicking on "Backtest".

If I comment out the lines
Code:
set(PARAMETERS);
DataSplit = 80;
NumWFOCycles = 10;



then the backtest works ok, no error is shown. I have looked for the obvious: errors in code, wrong array indexes or divisions by zero, but I think I don't have any of these...

I think the problem is in exceeding the stack size, and I think I know why.
This is the optimize line that makes the script fail:

Code:
int lookBacks[5] = {150,300,450,500,700};
LookBack = lookBacks[optimize(0,0,4,1)];



But if I change these lines with this, it doesn't crash:

Code:
int lookBacks[3] = {150,300,450};
LookBack = lookBacks[optimize(0,0,2,1)];



Do this make sense to you? Can I upsize the stack value in Zorro Trader?
I am only optimizing one parameter, with 3 possible values. Is it normal that with 5 possible values the stack gets full and makes the script crash?