Ink cartridge having a movable part arranged to break printer sensor beam