Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How may I filter stocks using conditions on two different time intervals?

I'm new to Quantopian so pardon me for asking such a basic question.

I would like to filter for stocks that satisfies a condition under one time interval, but also an other condition on an other different time interval. The introduction to the pipeline outlines how one could create a filter for one time frame, but is it possible to filter under two different time intervals?

To keep it as simple as possible: say I want to get the symbols from USEquityPricing data that has a 50 day SMA > 250 day SMA during 2019-01-01 to 2019-01-07 and also a 50 day SMA > 250 day SMA during 2020-01-01 to 2020-01-07. How would I do that?

Much grateful for any help provided!