I see your point, but at least in this case if i set lookback to 0, then no optimization is performed (everything returns 0) and the system is useless.

The only solution as it seems to be is just having at least double historic data than simulation period, if not, i canīt use this function.

So, i am afraid iīll forget about this unless someone has an alternative solution.

Thanks.