The extensive use of small base stations (BSs) in the fifth Generation (5G) raises the probability of handover (HO) which will subsequently increase the incidences of handover ping-pong (HOPP) probability and radio link failure (RLF). In such scenario, ensuring uninterrupted communication for users who are moving across different BSs is crucial, which makes mobility management a significant concern. As a result, mobility robustness optimization (MRO) has been introduced and enhanced to serve as a vital function of the self-optimization network (SON) in the 5G network and beyond. However, MRO's primary objective is to tackle problems related to mobility management when users move between BSs, with the goal of ensuring a seamless connection. Therefore, this study proposes a weighted function over 5G network using several mobile speed scenarios. Moreover, a trigger timer is proposed for reducing unnecessary HOs. Furthermore, random way point was presented as the mobility model using a voronoi simulation environment. However, the simulation results show that the proposed algorithm achieved a significant system performance in HOPP better than the proposed algorithm addressed in the literature. Moreover, during the simulation time the proposed weighted function achieved a reduction in HOPP probability of 0.001 and 0.004 at 150 sec. and 400 sec., respectively which is lower than the compared fuzzy logic controller (FLC) algorithm.