Calculating SNR for ECG signals
I don't know about real time application normally what I am doing is to calculate $\mathrm{PRD}$ first and calculate $\mathrm{SNR}$ from $\mathrm{PRD}$ 

$$\mathrm{SNR}=-20\log_{10}(0.01\mathrm{PRD})$$

$\mathrm{PRD}$ -  Percentage Root Mean Square Deviation