A method for operating a wind farm (500, 600, 700), comprising selecting at least two wind turbines of the wind farm, each of the at least two wind turbines comprising a yaw system operating at a respective current yaw angle setpoint, the at least two wind turbines forming at least a sub-set of the wind turbines of the wind farm; determining a wind condition based at least in part on one or more wind measurements; determining a wake-effect between the at least two wind turbines based at least in part on the wind condition, wherein determining the wake effect includes comparing the wind velocity as given by an anemometer of the respective wind turbine to determine a turbulence intensity and/or a wind deficit as a measure of the wake effect, and wherein the turbulence intensity and/or the wind deficit is cross-checked using the power production and the pitch activity of the wind turbine, wherein the cross-checking includes using e.g. a dynamic model of the wind turbine; determining a desired yaw angle setpoint for each of the at least two wind turbines so that a total power production of at least the sub-set is greater compared to independently operating the yaw systems of each of the at least two wind turbines with said respective current yaw angle setpoint, wherein the desired yaw angle setpoints are only determined when the wake effect is higher than a predefined threshold, wherein determining the desired yaw angle setpoint comprises estimating an expected local wind vector for at least one of the at least two wind turbines using at least the wind condition as an input and limiting an expected load for at least one of the at least two wind turbines; and using the desired yaw angle setpoints for controlling the yaw systems of the at least two wind turbines. selecting at least two wind turbines of the wind farm, each of the at least two wind turbines comprising a yaw system operating at a respective current yaw angle setpoint, the at least two wind turbines forming at least a sub-set of the wind turbines of the wind farm; determining a wind condition based at least in part on one or more wind measurements; determining a wake-effect between the at least two wind turbines based at least in part on the wind condition, wherein determining the wake effect includes comparing the wind velocity as given by an anemometer of the respective wind turbine to determine a turbulence intensity and/or a wind deficit as a measure of the wake effect, and wherein the turbulence intensity and/or the wind deficit is cross-checked using the power production and the pitch activity of the wind turbine, wherein the cross-checking includes using e.g. a dynamic model of the wind turbine; determining a desired yaw angle setpoint for each of the at least two wind turbines so that a total power production of at least the sub-set is greater compared to independently operating the yaw systems of each of the at least two wind turbines with said respective current yaw angle setpoint, wherein the desired yaw angle setpoints are only determined when the wake effect is higher than a predefined threshold, wherein determining the desired yaw angle setpoint comprises estimating an expected local wind vector for at least one of the at least two wind turbines using at least the wind condition as an input and limiting an expected load for at least one of the at least two wind turbines; and using the desired yaw angle setpoints for controlling the yaw systems of the at least two wind turbines. estimating an expected local wind vector for at least one of the at least two wind turbines using at least the wind condition as an input and limiting an expected load for at least one of the at least two wind turbines; and using the desired yaw angle setpoints for controlling the yaw systems of the at least two wind turbines.