I'm not quite sure what you mean, but from your graph it *looks* like you want to find the biggest 'dip' - ie, each time your account hits a peak, how far it falls below that peak before you move to another high? Grabbing the max difference is easy, ...