The work is devoted to considering the possibility of improving the focusing properties of a space charge lens due to charge retention of positive ions by an electric field that varies both in time and along the axis of the system. Numerical calculations of motion trajectories of positive argon ion during interaction with an alternating electric field with oscillation frequencies in the range of 1...8 MHz and amplitude in the range of 1.5...6 kV were carried out. A significant increase in the residence time of positive argon ion in the overcompensated beam of negative hydrogen ions is shown, which indicates the possibility of significant influencing focusing charge in the lens for focusing beams of negative hydrogen ions.