In this paper, we show how optimization methods can be used efficiently to determine the parameters of an oscillatory model of handwriting. Because these methods have to be used in real-time applications, this involves that the optimization problems must be rapidely solved. Hence, we developed an original heuristic algorithm, named FHA. This code was validated by comparing it (accuracy/CPU-times) with a multistart method based on Trust Region Reflective algorithm.