The design of a closed-loop guidance algorithm for autonomous relative motion is an important issue within the field of orbital dynamics. In this paper, we develop a closed-loop, waypoint-based, quasi-optimal algorithm that can be employed to execute autonomous rendezvous in relative motion. Specifically, the deputy spacecraft is executing an autonomous rendezvous with the chief spacecraft via a modified version of the zero-effort-miss/zero-effort-velocity (ZEM / ZEV) feed-back guidance. Here, the concept of waypoints-based guidance is introduced; they are defined as intermediate position and velocity targets between the departure point and the real final rendezvous. The position and velocity guidance is therefore divided in intervals. The ZEM/ZEV guidance parameters, represented by the coordinates of the final desired position, the components of the final required velocity and the time needed to reach these targets, will be different depending on the time interval. To determine the guidance parameters, referred to as waypoints parameters, different strategies are analyzed. Specifically, a series of optimization problems, based on the minimization of the fuel consumption constrained by the need to achieve high level of position and velocity accuracy, are formulated and solved. The first the case analyzed is the one in which the position trajectory of the spacecraft is unconstrained. The dynamical models considered for this case are the Clohessy-Wiltshire-Hills (CWH) model (circular orbit) and the Linearized equations of relative motion (LERM) model (elliptic orbit). Then, a more challenging case is studied: Some nonlinear constraints related to the entire position trajectory are introduced in the optimization problem formulation. It is demonstrated that in all scenarios, the performances are satisfactory both from the point of view of the mass propellant expenditure and of the final position and velocity errors. Finally, the robustness of the waypoint-based ZEM/ZEM guidance is tested by simulating the closed-loop guidance in a higher fidelity dynamical model comprising the Restricted-two-body-problem (R2BP) nonlinear model with perturbations, expressed in form of acceleration. In addition to disturbances, a Monte Carlo analysis is conducted to test the system under off-nominal conditions. The results show that the waypoint-based ZEM/ZEV feedback guidance is able to execute not only precise but also quasi-optimal rendezvous maneuvers in perturbed working conditions.