Standard full-waveform inversion (FWI) attempts to minimize the difference between observed and modeled data. However, this difference is obviously sensitive to the amplitude of observed data, which leads to difficulties because we often do not process data in absolute units and because we usually do not consider density variations, elastic effects, or more complicated physical phenomena. Global correlation methods can remove the amplitude influence for each trace and thus can mitigate such difficulties in some sense. However, this approach still suffers from the well-known cycle-skipping problem, leading to a flat objective function when observed and modeled data are not correlated well enough. We optimize based on maximizing not only the zero-lag global correlation but also time or space lags of the modeled data to circumvent the half-cycle limit. We use a weighting function that is maximum value at zero lag and decays away from zero lag to balance the role of the lags. The resulting objective function is less sensitive to the choice of the maximum lag allowed and has a wider region of convergence compared with standard FWI. Furthermore, we develop a selective function, which passes to the gradient calculation only positive correlations, to mitigate cycle skipping. Finally, the resulting algorithm has better convergence behavior than conventional methods. Application to the Marmousi model indicates that this method converges starting with a linearly increasing velocity model, even with data free of frequencies less than 3.5 Hz. Application to the SEG2014 data set demonstrates the potential of our method.