Recent indirect experimental evidence suggests that synaptic plasticity changes along the dendrites of a neuron. Here we present a synaptic plasticity rule which is controlled by the properties of the pre- and postsynaptic signals. Using recorded membrane traces of back-propagating and dendritic spikes we demonstrate that LTP and LTD will depend specifically on the shape of the postsynaptic depolarization at a given dendritic site. We find that asymmetrical spike-timing-dependent plasticity (STDP) can be replaced by temporally symmetrical plasticity within physiologically relevant time windows if the postsynaptic depolarization rises shallow. Presynaptically the rule depends on the NMDA channel characteristic, and the model predicts that an increase in Mg(2+) will attenuate the STDP curve without changing its shape. Furthermore, the model suggests that the profile of LTD should be governed by the postsynaptic signal while that of LTP mainly depends on the presynaptic signal shape.