You're treating the symptoms, not the cause. It's like taking a panadol when you've just had your leg cut off, you really need to address the problem, not the effects.
Have a look at this and figure out exactly what algae you have. After that, you can look at what causes it and change what you're doing. It could be something as simple as too much light or too little CO2.