Hi!

I am trying to use the BarPeriod = optimize(...) but it seems that is not working as I thought and can't find any example of that.

I read the docs and found that it should be possible after Zorro 1.14 (https://zorro-project.com/manual/en/new.htm):

"The BarPeriod variable can now be set from an optimize call, except for WFO."

And also show some forum examples that are working (https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=431959) but I try several variations without any luck so far:

BarPeriod = optimize(60,60,240,10);

The script in train mode starts but after Step 1 stop with the following message:

Error 030 - check order of settings


I would like to use that to find the best timeframes for the strategy as described in the above post. Not really to optimize anything but as a first strategy design step.

I know that I can use TimeFrame without limitations and it works, but as BarPeriod and Timeframe are not really the same thing the results are not as expected.

Any help or hint would be much appreciated


Last edited by CpOo; 02/07/21 11:35.