Your -219p loss was with a bar period of 15, not 18.

Parameters such as Barperiod, which are already needed for price loading at script start, must be optimized in a special way, if at all. Look here (under "Remarks"): http://manual.zorro-trader.com/optimize.htm