The last bar of the simulation is indicated with the EXITRUN flag. Zorro closes all trades on this bar.

As to the printing, DdlV is right: If the printed conditions contradict the result, then the bug is in the remaining conditions. Quoting Sherlock Holmes: When you have eliminated the impossible, whatever remains, however improbable, must be the truth. My first suspect in your if() line would be the dow() - check if this condition can ever be true before the weekend. It depends on which bars you're using.