The arrival direction distribution of ultra-high energy cosmic rays (UHECRs) is a key element to understand their sources and composition as well the galactic and
extragalactic magnetic fields. The particles that arrive on Earth with energies above $\sim 50$ EeV must be originated in sources nearby us as a
result of the GZK effect. Furthermore, if these particle are protons and the magnetic fields along their propagations until Earth are not too
large, we expect that their arrival directions are correlated with their sources. The cross-correlation used in cosmology is a good tool for
studying such anisotropies in the cosmic ray data. In this work, assuming a proton composition, we modify the Landy-Szalay cross-correlation estimator in order to take into account the energy losses in the cosmic ray propagation due to its interaction with the background radiation. Using Monte Carlo simulations, we have compared its efficiency with relation to the original estimator, testing the correlation of
the simulated events arrival directions with sources from the 2MRS catalog. We show that even in case of absence of significant signal, the modified estimator has the capability to constrain the proton fraction of the experimental data provided that the detection efficiency of the astrophysical scenario under consideration is maximal.