Modern power systems which integrate renewable energy sources (RESs), such as wind or solar energy sources and plug-in electric vehicles (PEVs), need to carry out the uncertainty due to the access of demanded or injected power. Therefore, it is necessary to consider uncertainty costs in optimal power flow problems. To develop the uncertainty cost functions, log-normal probability distribution function (PDF) for solar irradiance, normal PDF for unloading and loading behavior of PEVs, and Rayleigh PDF for wind speed are considered. In this work, a dynamic optimal power flow (DOPF) model is formulated by considering the uncertainties of RESs and PEVs. A newly hybrid metaheuristic algorithm named cross entropy (CE) covariance matrix adaption evolutionary strategy (CMAES) is proposed to evaluate the DOPF problem in a modified IEEE 118-bus system. The application of adaptive step length in the CMAES method improves the local exploitation capability, while the CE method is used in the initial stage for global exploration due to its fast convergence. Simulation results indicate that the proposed technique can solve the DOPF problems with RESs and PEVs effectively and can provide high-quality solutions compared to different techniques. The conventional statistical method called ANOVA test is performed for comparative analysis of different techniques. The results of this test show the validation of CE-CMAES compared to different optimization techniques. Therefore, the proposed method could be easily and efficiently applied by power system operators in real-time optimal power flow operations.