The Electrocardiogram (ECG), represents the electrical activity of the heart. It is characterized by a number of waves P, QRS, T which are correlated to the status of the heart activity. The most predominant wave set is the QRS complex. In this paper, we have developed a new algorithm for the detection of the QRS complexes. The algorithm consists of several steps: signal to noise enhancement, differentiation, first-order backward difference, non linear transform, moving window integrator and QRS detection. This algorithm is tested on ECG signals from the universal MIT-BIH arrhythmia database and compared with Pan and Tompkins' QRS detection method. The results we obtain show that our method performs better than the Pan and Tompkins' method. Our algorithm results in lower false positives and lower false negatives.