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.

Catching the price hitting monthly SMA 20 better

edited July 2021 in Scanning
Hi,

I was wondering if anyone had any suggestions on how to capture this monthly hit close to the SMA 20? I tried the following scan but can't seem to hit this one.




FYI, this is ZM on the monthly chart if you want a better look.


[type = stock]
and [group is not FinancialSector]
and [group is not UtilitiesSector]
and
[
[exchange is NYSE]
or [exchange is NASDAQ]
]
and [name not contains "Fund"]
and [name not contains "Income"]
and [name not contains "shares"]
and [name not contains "trust"]



and [MONTHLY low < monthly sma(20)*1.1]
and [monthly low > monthly sma(20)]
and [1 month ago low > 1 month ago sma(20)*0.95]
and [2 months ago low > 2 months ago sma(20)*0.95]
and [3 months ago low > 3 months ago sma(20)*0.95]
and [4 months ago low > 4 months ago sma(20)*0.95]
and [5 months ago low > 5 months ago sma(20)*0.95]
and [6 months ago low > 6 months ago sma(20)*0.95]
and [7 months ago low > 7 months ago sma(20)*0.95]
and [8 months ago low > 8 months ago sma(20)*0.95]
and [9 months ago low > 9 months ago sma(20)*0.95]
and [10 months ago low > 10 months ago sma(20)*0.95]
and [11 months ago low > 11 months ago sma(20)*0.95]

Comments

  • markdmarkd mod
    edited July 2021
    Should be a simple edit: add "monthly" in front of "sma(20)" as you did in the first two lines.

    example:

    and [1 month ago low > 1 month ago monthly sma(20)*0.95]

    As you have it, I think it would be looking at the daily sma, or possibly ignoring those lines without giving you a syntax error.
  • lmkwinlmkwin ✭✭
    Another "helpful" tip is to put a Moving Average Envelope on your chart so you can see where the data points are. In your case, you are creating a key scan requirement related to 10% above the SMA 20 line and you want the low to be below 10% above.

    If you put a SMA Envelope on your monthly chart and use the parameter 20,10, a pair of lines will display on the chart showing 10% above and below the 20 SMA.

    Any time you are trying to use a "close to" criteria, the Envelopes can often assist in viewing what you are asking for on the chart and in troubleshooting your scan.

Sign In or Register to comment.