stock price peaks calculation program