How might I test if a price series is higher for at least N days in a row?

This gives my a price series higher for five days in a row starting yesterday...


bool risingFiveDays = (Prices[1] > Prices[2]) && 
				    (Prices[2] > Prices[3]) && 
				    (Prices[3] > Prices[4]) && 
				    (Prices[4] > Prices[5]) &&
				    (Prices[5] > Prices[6]);

How to generalize this to _at least_ five days starting yesterday?

Last edited by strimp099; 02/22/21 08:21.