What kind of algae is it? As a general rule..
- Green/Lighter algae = Too much light
- Brown/Darker Algae = Phosphate levels are too high
5ppm Nitrates out of the tap is fine, and quite normal in most water supplies, my taps Nitrate levels are also 5ppm. If you're getting standard run of the mill green algae on your glass, invest in some Plecostomus, Bristlenose or Bushynose Pleco are great algae eaters and they won't outgrow tanks large enough to hold even small Cichlids. They'll also keep Phosphate levels down as they will scavenge most scraps from your substrate.
Phosphate levels contribute to darker forms of algae like Beard/Brush Algae which can and has plagued my tanks in the past. I've currently got it under control in my display tank with only a few noticeable specs here and there.
Main contributors to Phosphates are overfeeding, which causes food scraps and extra feces to decompose and release Nitrates and Phosphates; this is the main cause, feces being broken down will continue to release Phosphates and Nitrates, at least to my understanding. While my main stocking helps combat this, with Eartheaters scavenging a lot of food throughout the day, I've also got 2 Ancistrus sp. Bristlenose Pleco's, and 2 True Siamese Algae Eaters (Often called Siamese Flying Foxes or Chinese Algae Eaters) which are renowned for eating Black Beard Algae. Combined with my sump that has very easily interchanged and cleaned mechanical media and a great flow rate to suck up feces, as well as weekly Gravel vacuums to make sure I get what feces isn't removed by my Filtration, I'm hardly noticing any dark algae growth.
If you're having problems with dark algae, regular filter cleaning (in tank water!), removal of as much feces as possible and a healthy and rigorous but not overdone feeding schedule, combined with a cleanup crew will keep it under control.
If you're having problems with green algae on your glass and rocks, Bristlenose Pleco absolutely go nuts over this, and reducing your lighting periods (including cutting them off for an hour in the middle of the day, or more) can reduce and hint its growth. The sun is honestly the biggest contributor to green algae so if your tank is in direct sunlight at any point of the day you're always going to have problems with it.
Without going into Fertilizers, cO2, etc. That's about it. Bare in mind that some water supplies will just have trouble with it no matter what.