Mass accretion from the circumstellar disk onto the protostar is a fundamental process during star formation. Measuring the mass accretion rate is particularly challenging for stars belonging to binary systems, because it is often difficult to discriminate which component is accreting. DQ Tau is an almost equal-mass spectroscopic binary system where the components orbit each other every 15.8 days. The system is known to display pulsed accretion, i.e., the periodic modulation of the accretion by the components on eccentric orbit. We present multi-epoch ESO/Very Large Telescope X-Shooter observations of DQ Tau, with the aim of determining which component of this system is the main accreting source. We use the absorption lines in the spectra to determine the radial velocity of the two components, and measure the continuum veiling as a function of wavelength and time. We fit the observed spectra with nonaccreting templates to correct for the photospheric and chromospheric contribution. In the corrected spectra, we study in detail the profiles of the emission lines and calculate mass accretion rates for the system as a function of orbital phase. In accordance with previous findings, we detect elevated accretion close to periastron. We measure the accretion rate as varying between 10-8.5 and 10-7.3 M ⊙ yr-1. The emission line profiles suggest that both stars are actively accreting, and the dominant accretor is not always the same component, varying in a few orbits.