New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
EMA 20 above EMA 50 for x number of days
Part of one of my scan is trying to find stocks which the EMA 20 is being above EMA 50 for x number of days, and rising. Once found, then I will look for an even shorter EMA (3, 5, 10) that crosses above EMA 20. This "ideally" should find strong stocks that made a pull-back, and continue their ascent. But I want to make sure the EMA 20 never went below EMA 50.
E.g. this scan
and [today's ema(20,close) > 20 days ago ema(50,close)]
will list stocks that might include EMA 20 that was below "yesterday's" EMA 50, though it will be above 20 days ago.
How to make sure that during x number of days the EMA 20 did not go below EMA 50?