by molesting it all the time. The more you get on its nerves, the more likely is it that it'll move to a quieter vicinity. But if the problem is just the banging against the window, you could have a look at the tree and find out which twig it is that touches your window. You cut it back and the noise is gone. Win/win for both you and the bird