An evaluation of two-particle resonances in the complex energy plane is presented. The representation used in the method consists of bound and antibound single-particle states, Gamow resonances and scattering waves on the complex energy plane. Within this representation the structure of halo nuclei is studied.