The objective() function is for calculating trade statistics in the training mode. The EXITRUN won't work since the statistics are only known after the run.