A new approach for gradient estimation in the context of real-time optimization under uncertainty is proposed in this paper. While this estimation problem is often a difficult one, it is shown that it can be simplified significantly if an assumption on the local quasiconvexity of the process is made and the resulting constraints on the gradient are exploited. To do this, the estimation problem is formulated as a constrained weighted least-squares problem with appropriate choice of the weights. Two numerical examples illustrate the effectiveness of the proposed method in converging to the true process optimum, even in the case of significant measurement noise.