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.

Moving average crossover in the last 5 days

i want to scan for all the stocks that had 10EMA crossing over 20EMA in the last 5 days. Thx in advance.


  • Options
    markdmarkd mod
    edited December 2022
    The easiest and most accurate way is to run this code for today:

    and [ema(10, close) x ema(20,close)]

    Then re-run the scan for each of the last four days by adjusting the calendar tool " Starting 0 trading days before the..." above the scan window. Click on the zero and select yesterday's date. Repeat for each date.

    If you want one scan, you would need to write a more complicated "or" routine.


    [ema(10, close) x ema(20,close)]


    [1 day ago ema(10, close) x 1 day ago ema(20,close)]


    [ 2 days ago ... ]




Sign In or Register to comment.