Ventricular tachyarrhythmias are potentially lethal cardiac pathologies and the commonest cause of sudden cardiac death. Efforts to predict the onset of such events are based on feature extraction from the surface ECG. T-wave alternans (TWAs) are considered a marker of abnormal ventricular function that may be associated with ventricular tachycardia (VT) and ventricular fibrillation. A novel TWA detection algorithm utilizing the continuous wavelet transform is described in this paper. Simulated ECGs containing artificial TWA were used to test the algorithm that achieved a sensitivity of 91.40% and a specificity of 94.00%. The algorithm was subsequently used to analyze the ECGs of eight patients prior to the onset of VT. Of these, the algorithm indicated that five patients exhibited TWA prior to the onset of the tachyarrhythmic events, while the remaining three patients did not exhibit identifiable TWA. Healthy individuals were also studied in which one short TWA episode was detected by the algorithm. However, closer visual inspection of the data revealed this to be a likely false positive result.