I have residual nitrate around .1 and phosphates at 1-3 ppb and I can get algae overgrow my tank if I don't have critters to eat it. Pincushions, snails and sometimes a rabbitfish can help. I rarely have had tangs do any good, but some have.
Sand beds have no way to make nitrate out of nothing. In fact, the anoxic areas deeper in the sand convert nitrate into nitrogen gas and complete the FULL nitrogen cycle, so they do the opposite of a "nitrate factory." You need about 2 inches, or more, for this to usually happen, but sometimes less is OK. It can take a number of months for these anoxic bacteria to grow and populate. You also need to leave it alone.
Algae can get nitrogen directly from ammonia, so residual nitrate levels are near meaningless, even though message board mobs think otherwise. I would keep the N and P low enough for coralline to thrive - it gets growth limited the higher N and P climb. Surfaces with live and growing coralline do not have algae, cyano, dinos and diatoms attach. Not all purple stuff is alive and thriving, though. Other surface stuff on real live rock can also keep nasty things at bay... surface bacteria and slime being the most common. Dry and dead rock is a super easy and nice place for ugly things to attach and grow.