Hi Septi,
I understand that you want to detect the P-QRS peaks from the ECG data collected through sensors. I recommend you to go through the below link that provides an example to visualize and analyze the ECG signal.
Also, this can be achieved very well by using Simulink. Below is the documentation link that provides an example of Real-time ECG QRS Detection.