Electrocardiogram (ECG) signal is used to analyze the cardiovascular activity in the human body and has a primary role in the diagnosis of several heart diseases. The QRS complex is the most distinguishable component in the ECG. Therefore, the accuracy of the detection of QRS complex is crucial to the performance of subsequent machine learning algorithms for cardiac disease classification. The aim of the present work is to detect QRS wave from ECG signals. Wavelet transform filtering is applied to the signal in order to remove baseline drift, followed by QRS localization. By using the property of R peak, having highest and prominent amplitude, we have applied thresholding technique based on the median absolute deviation(MAD) of modulus maximas to detect the complex. In order to evaluate the algorithm, the analysis has been done on MIT-BIH Arrhythmia database. The results have been examined and approved by medical doctors.