We propose an unconstrained stochastic approximation method of finding the optimal measure change (in an a priori parametric family) for Monte Carlo simulations. We consider different parametric families based on the Girsanov theorem and the Esscher transform (or exponential-tilting). In a multidimensional Gaussian framework, Arouna uses a projected Robbins-Monro procedure to select the parameter minimizing the variance. In our approach, the parameter (scalar or process) is selected by a classical Robbins-Monro procedure without projection or truncation. To obtain this unconstrained algorithm we intensively use the regularity of the density of the law without assume smoothness of the payoff. We prove the convergence for a large class of multidimensional distributions and diffusion processes. We illustrate the effectiveness of our algorithm via pricing a Basket payoff under a multidimensional NIG distribution, and pricing a barrier options in different markets.