When you shock the pool to get rid of the algae, you have to keep it at shock level until ALL of the algae is dead, including what you can't see. If you don't, then it keeps coming back, as you've seen. Darkside and Charlie have brought up some good points--keeping the pool shocked until you're no longer losing chlorine at night is an important part of this process, but verifying that CYA level is probably a good idea.....

When you brought the chlorine up to "shocking level", what level did you bring it to, and how did you measure it?