You really shouldn't be switching off the batteries when the engine/alternator is running. Chances are very likely that the belt is glazed and needs to be replaced. It is probably slipping under the load that the alternator puts on it when it tries to charge the batteries.
Never turn the battery switch off with the engine running. And I have to ask why would you ever do this, or want to. This is more than a little detrimental to the alternator, and I would be surprised if you have not blown some diodes already. The squealing is probably a slipping belt, because it is either loose or glazed.
Rule of thumb for a V belt drive for an alternator is about 100amps per belt, assuming the belt is in good shape and the pulleys are in alignment. As with most marine systems, keep an extra belt on board when the existing one is on the way out. Black powder around the engine, squealing sounds are clues that the belt is slipping and needs tightening or when the belt is too narrow, replacement.
A 65 Ford mustang that I drove had a worn alternator mount where the pulleys were not in alignment, it would squeal occasionally and was terrible on belts.