I test before every water change (Ca, Mg, alk). I dose the water change to 440 ppm Ca, and 1320 ppm Mg, using IO salt (which tends to mix up with relatively high alk, mine is generally 11). I dose Tailored Aquatics products (Calcium Plus, Reef Magnesium) for Ca and Mg, and use a tiny bit of Arm and Hammer baking soda (to keep alk up) in between water changes. Since I do a water change every week (though I have occasionally gone 2) and I know how much my tank uses in a day, I directly dose the tank once daily for Ca and Mg (I dose a lot less Mg, unless I forget completely

I just remembered I didn't dose yesterday). The baking soda I use once a week, in between water changes. Seems to work for me so far, but I don't have any SPS, just coralline and an open brain. I may have to try something different when I get some SPS in there.