Hi,
I have a string of stock price data data and I want to be able to count how many days the price moves up or down lasted. So for example, from the data I have a used "if" functions to determine if a day was up or down: "U" for and Up day and "D" for a Down day. Lets say the string then looks like this:
UUUDDUDUDUDUUU
I want a formula to count that there were 3 Up days, and 2 Down Days, 1 Up, 1 Down etc etc... and then I will be able to built a profile of how long the prices moves in one direction lasted....i want to then display the results in histograms or charts.
Does anyone know what formula or function I can use to get the results I want?
Appreciate any help. thanks