Pulse sensor Amped

If the standard software does not work what makes you think your own software will work any better. Basically you have a hardware problem.

The processing that shows the heartbeats work, but it only changes every time i touch it,

No the heart beat does not work if that is what it does.
These sorts of sensors are not as easy to use as you might think. You have to be very still and let the sensor settle down before it produces worthwhile results.