A dosing unit (12) for an ambulatory infusion pump device (10) comprises a cylinder pump with a cylinder (14) and a piston (16) arranged in said cylinder. The piston has a shaft (18) with a first threaded segment (50) interacting with a threaded portion (54) of the cylinder, and can be displaced along a longitudinal axis (48) of the cylinder by rotating the piston in regard to the cylinder around said axis. Furthermore the piston comprises means that allow the relative or absolute determination of the longitudinal and/or rotational displacement of the piston in regard to the cylinder. In a preferred embodiment the piston shaft (18) comprises a second segment (51) provided with optically detectable markings (64, 65) that allow the monitoring of the longitudinal and/or rotational displacement of the piston in regard to the cylinder.