An implantable medical device (100) is connected to a multipolar LV lead (30) and an implantable sensor (60). The sensor signal from the sensor (60) is used to identify a time point of mitral valve closure for a cardiac cycle when a ventricular pulse generator (130) generates pacing pulses that are applied to the electrodes (32, 34, 36, 38, 52, 54) of the multipolar LV lead (30) according to a pacing sequence. A time interval processor (154) determines the time interval from onset of LV activation to the time point of mitral valve closure. This procedure is repeated for multiple different pacing sequences of a sequence set. The pacing sequence that resulted in shortest time interval is then selected by a selector (156) as the currently optimal pacing sequence for the patient (10).