I don't know if this is what you have
http://www.webmd.com/pain-management...topic-overview but I am plagued by knee pain if I don't keep my hamstrings and my quadriceps stretched daily. If I understand it correctly the kneecap will often move incorrectly through it's track if your muscles surrounding it are insufficiently limber.