Following Oriols (2007 Phys. Rev. Lett. 98 066803), an algorithm to deal with the exchange interaction in non-separable quantum systems is presented. The algorithm can be applied to fermions or bosons and, by construction, it exactly ensures that any observable is totally independent of the interchange of particles. It is based on the use of conditional Bohmian wave functions which are solutions of single-particle pseudo-Schrödinger equations. The exchange symmetry is directly defined by demanding symmetry properties of the quantum trajectories in the configuration space with a universal algorithm, rather than through a particular exchange-correlation functional introduced into the single-particle pseudo-Schrödinger equation. It requires the computation of N2 conditional wave functions to deal with N identical particles. For separable Hamiltonians, the algorithm reduces to the standard Slater determinant for fermions (or permanent for bosons). A numerical test for a two-particle system, where exact solutions for non-separable Hamiltonians are computationally accessible, is presented. The numerical viability of the algorithm for quantum electron transport (in a far-from-equilibrium time-dependent open system) is demonstrated by computing the current and fluctuations in a nano-resistor, with exchange and Coulomb interactions among electrons. © 2013 IOP Publishing Ltd.