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.

Need help with scan

Hello, need help developing a scan when the price meets resistance at the 200 EMA. It doesn't cross, but bounces off. Thank you

Comments

  • markdmarkd mod
    edited February 22
    So, are you thinking of:

    the 200 EMA is falling, price comes up from below, hits it and goes back below ? Technically, that would be resistance.

    Or, do you want 200 EMA is rising, price falls to it and bounces back up ? Technically that's support.

    Most people don't short, so I just want to be sure.

  • I short, so Im interested in scanning for stocks that hit the 200 EMA from below and hit resistance, does not cross. Thank you for your time.
  • OK.

    [group is sp600] // or whatever you want

    and [ema(200, close) < 20 days ago ema(200, close)] // ema 200 is falling

    and [10 days ago close < 10 days ago ema(200, close)] // price below ema 10 days ago

    and [max(10, close) > 10 days ago ema(200, close)] // price has been above middle ema price

    and [close < ema(200,close)] // price today is below the ema


    Note any of the parameters are arbitrary, play with them however you wish.

    The idea is price was below the ema, and its below the ema now, but it was recently above the ema.

    If we use max( ) we don't have to specify which day was above the ema. But 10 days ago ema is a compromise target.

    The ema is moving. If we ask for a max(10) price above today's ema, the ema may have been higher than max 10 on the day of the the max 10 price, so there was no cross.

    If we ask for max 10 above the 20 days ago ema, price might have been above the ema on its max day, but still below the 20 day ema price.

    So 10 days ago seems a reasonable compromise. You should experiment though if you want.
  • Awesome! Thanks so much. I will play around with it, but you gave me what I need. thanks
  • Here's a scan that uses the Slope function to control the steepness of the downtrend.
    //// Universe of stocks
    [ [exchange is NYSE] or [group is SP500] or [group is SP100] or [group is SP400]
    or [group is SP600] or [group is NASDAQ100] or [group is DOW30]or [group is DOW65]]
    and [SMA(20, Volume) > 500000] // adjust as required
    and [Slope(100,EMA(20)) < -.5] // adjust to change the steepness of the downtrend
    and [Slope(3,close) > 0] // adjust to modify the timeline of the corrective rally
    and [high < EMA(200)] // ensures the EMA(200) hasn't been touched yet

    This scan as is yielded 20 results on 25 Feb, 3pm Central Time. These stocks have been in a
    downtrend for around 4-5 months and only recently have begun their corrective rally, so many are
    nowhere near their 200 day EMA. I suggest shortening the time of the EMA, down to 50 or 20. The
    corrective rallies of these stocks will probably end a good ways from their 200 EMA, and if they do,
    then they are probably have reversed into a true bullish trend, not a corrective rally.
Sign In or Register to comment.