Been there.... two years. All I can say is don't treat the symptom find the source. I ended up replacing my rock to get rid of a PO4 problem. A lot of newbie mistakes went into that rock and now it's cooking quietly in the back yard.
Maybe one day I'll dry it out and see how it would look in the tank, but now the SPS is growing and encrusting and the coralline algae has a foothold.
Don't let it get you down, and don't give up. Until recently my sig stated that one of my hobbies was "maintaining my algae farm"