Re-read the manual on enter/exit commands: trading is disabled during the lookback period, and the first bar after the lookback is StartBar, not 1.

So, remove Bar>1 ( or substitute it with ( if (!is(LOOKBACK)) or Bar>StartBar) and remove quit().