I would also check your squat form. are your shins vertical? are you driving the upper legs outward as you descend? if they are not vertical during the regular squat, and are driving forward of the feet instead, this will put a ton of pressure on the structures around the knee. then you exacerbate the problem with the pistol (i assume it’s a one legged pistol) because in order to complete the pistol, you’ll have to push the knee forward of the foot.