Nonstationarities and nonlinearities will be probably unavoidable in data stream coming from actual and future gravitational wave detectors. This means that vetoing procedures should be implemented to identify spurious events tagged by Wiener filtering. We show that when the parameters of a coalescing binaries event are unknown a large class of detectors can be defined, which can be proved to be "optimal" in an appropriate asymptotic limit of "many data". We address the question of the robustness of a detection algorithm belonging to this "optimal" class, and we argue that the usual approach based on the maximization of matching on a given filter bank is not necessarily the best one. We propose some alternatives, discussing their properties and their computational cost.