Lets say i wanted to build a system that will buy when a security is trading above an rsi(14) value of 70 for 5 consecutive days and sell 7 days later. How can i do that?
It looks like the handle_data method only processes data for the current period and doesn't allow any looking back at previous values. Is this correct?
if so, then is the only way to maintain a counter of the number of consecutive days the security is above an rsi value of 70? Or is there a way to use lamda expressions to look back and check if the last 5 values are > X?