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.
Options

Scan price close to Moving averages

What is the best way to scan( weekly time frame) stocks that are very close (within 2%) of the 20SMA ,50SMA and 100SMA(all 3). thanks

Comments

  • markdmarkd mod
    edited July 16
    [group is sp500] // or your choice

    and [weekly close > weekly sma(20, weekly close) * .98]
    and [weekly close < weekly sma(20, weekly close) * 1.02]

    and [weekly close > weekly sma(50, weekly close) * .98]
    and [weekly close < weekly sma(50, weekly close) * 1.02]

    and [weekly close > weekly sma(100, weekly close) * .98]
    and [weekly close < weekly sma(100, weekly close) * 1.02]

    // .98 is two percent below, or less than something
    // 1.02 is two per cent above, or greater than

    You will want to run this after the market close on Friday and before the market open on Monday to get "accurate" results. Or, if you run it during the week, you can use the calendar widget to set the run date for the previous Friday.

    If you run it during the week as of the current date and time, say Tuesday 10:30 am EDT, the scan engine will consider the most recent update (intraday or end of day) as the final weekly value even though the week is not finished yet. So you may think you have a signal on Tuesday, but by Friday it's gone. That doesn't mean you missed a signal - it means there never was a signal because the data was incomplete.

  • Thank you for the response
Sign In or Register to comment.