Maximum Linear Stock Score
Group the days by price minus index. Days in one group form a linear run, so the largest group total is the answer.
Group the days by price minus index. Days in one group form a linear run, so the largest group total is the answer.