  Aims. We aim studying the use of cross-correlation techniques to infer the
frequency shifts induced by changing magnetic fields in the p-mode frequencies
and provide precise estimation of the error bars. Methods. This technique and
the calculation of the associated errors is first tested and validated on the
Sun where the p-mode magnetic behaviour is very well known. These validation
tests are performed on 6000-day time series of Sun-as-a-star observations
delivered by the SoHO spacecraft. Errors of the frequency shifts are quantified
through Monte Carlo simulations. The same methodology is then applied to three
solar-like oscillating stars: HD 49933, observed by CoRoT, as well as KIC
3733735 and KIC 7940546 observed by Kepler. Results. We first demonstrate the
reliability of the error bars computed with the Monte Carlo simulations using
the Sun. From the three analyzed stars we confirm the presence of a magnetic
activity cycle with this methodology in HD 49933 and we unveil seismic
signature of on going magnetic variations in KIC 3733735. Finally, the third
star, KIC 7940546, seems to be in a quiet regime.
