The present invention relates to a control method for a wind turbine whereby it is possible to detect situations in which the machine is not working at its maximum performance point, wherein in addition, once these situations have been detected, the control method of the present invention allows to perform an automatic correction of the control parameters and to return the turbine to its optimum operating point.