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

Scanning for moving average cross overs

I wrote the following scan for the 8ema crossing above the 21ema for the current day. I need help with writing this scan for when the two dma's cross in the past for example 3 days ago or whatever time period I want to insert. Can someone help with this?

Thanks.

[type is stock]
AND[country is US]
AND [exchange is NASDAQ]
AND [name not contains 'Fund']
AND [name not contains 'ETF']
AND [name not contains 'ETN']
AND [name not contains 'iShares']
AND [name not contains 'PowerShares']
and [sma(20, volume) > 500000]
and [todays ema(8, weekly close) x todays ema(21, weekly close)]

Best Answers

  • Options
    markdmarkd mod
    Answer ✓
    The easiest way to scan for events happening on a particular day in the past is to use the calendar tool on the scan workbench page, above the scan window. Click on "0" days ago and select the date you want to scan.

    Otherwise, you would edit the time offsets in your scan. For instance

    and [3 days ago ema(8, weekly close) x 3 days ago ema(21, weekly close)]
  • Options
    markdmarkd mod
    Answer ✓
    'market cap' is a ticker property. You can get the default syntax for any ticker property from the drop down under the scan writing window on the scan workbench page.

    You can explore the ticker property values here:

    https://support.stockcharts.com/doku.php?id=scans:reference:ticker_properties

    or type the property name into search and it will take you to this page.

    market cap is expressed in millions, so

    and [market cap > 50]
  • Options
    lmkwinlmkwin ✭✭
    edited December 2023 Answer ✓
    and exchange is asking that the stock be on exchange NASDAQ AND exchange NSE. You would need to bracket those two lines and use OR as the second line

    and [[exchange is NASDAQ]
    OR [exchange is NSE]]

    Russell 2000 index membership isn't a predefined group to choose from. You'd have to load lists that contain the member securities and use those in a scan. If you look in the Indexes & ETFS dropdown, it shows the options available for index scanning



  • Options
    lmkwinlmkwin ✭✭
    Answer ✓
    1 Volume > SMA20,volume * 2
    current period volume is greater than the 20 day average volume time 2. 20 days is approximately 4 weeks

    I selected the SMA from the Technical Indicators Dropdown in the Scan Workbench. Defaults in like this:

    and [SMA(50,volume) > 9999999]

    I can change this to meet this requirement

    and [volume > SMA(20,volume) * 2]

    2 PctRelative XX, YY > 0

    XX is the period in days. YY is the comparison symbol like SPY or QQQ or whatever your RS comparison is. You can even use $Sector for YY to find relative strength vs the security's sector. $Industry for YY will screen relative strength vs the security's industry group.

    To get "hugging", you would need to define what is a hugging distance and then add another line to put a cap on the distance away from 0. PctRelative XX, YY < top acceptable hugging distance as a percent

    I selected the PctRelative from the Technical Indicators Dropdown in the Scan Workbench. Defaults in like this:

    and [PctRelative(20,$spx) > 0]

    This is applying a filter for those securities in your Universe where the 20 day return is greater than the 20 day return of the $spx.


    3 Price / Lower Price Channel ZZ > 1.4

    current price value divided by the ZZ lower price channel is greater than 40% away from the lowest price low price in the ZZ period.

    I selected the Lower Price Channel from the Technical Indicators Dropdown in the Scan Workbench. Defaults in like this:

    and [Lower Price Chan(20) > close]

    I can change this to meet this requirement

    and [close / Lower Price Chan(20) > 1.4]


    There are alternate options to some of these "filters" using different indicators but I'd say that these should get you on the road to triple confirmation in a relatively straightforward way.

    If you get stuck, copy and paste what you have in your scan for trouble shooting.

    The thing with Weinstein is that there is variability between when things happen that is tough to nail in a scan. The volume spikes but the price "breakout" happens on a different bar. Or the move from the lower price channel isn't high enough until AFTER the breakout is well underway. I tend to create a list of Stage 1's let's say and then look for signs of Stage 2 development. I also tend to focus less on the RS side as I will make no actual money based on Relative Strength. I will only make money on the Actual Strength of the security's action. Relative is a byproduct of circumstance based on a zig when the other is zagging or vice versa.


Answers

  • Options
    Thank you for the help. Another question? How do you write a syntax for market cap equal to or greater than 50 million?
  • Options
    Thanks again.
  • Options
    Can you tell me why am I not turning up any results when adding the NSE to my scan criteria? I would like my scan to include both Nasdaq and NSE. In addition, can you tell me how to add the Russell 2000 also? Thanks.

    [type is stock]
    AND[country is US]
    AND [exchange is NASDAQ]
    and [exchange is NSE]
    AND [name not contains 'Fund']
    AND [name not contains 'ETF']
    AND [name not contains 'ETN']
    AND [name not contains 'iShares']
    AND [name not contains 'PowerShares']
    and [sma(20, volume) > 500000]
    and [todays ema(8, weekly close) x todays ema(21, weekly close)]
  • Options
    Are you familiar with Stan Weinstein's Triple Confirmation Pattern? Im trying to write a syntax for it but it appears to be real complicated.
  • Options
    lmkwinlmkwin ✭✭
    edited December 2023
    Can you describe the Triple Confirmation Pattern? I assume it has 3 parts.
  • Options
    1. Volume more than twice the average trading of the past four weeks.
    2. RS line should be hugging the zero line. (Either just below or just above).
    3. The stock has to have risen 40-50 percent. (This one may be tough because it says stock should advance 40-50% before the stage 1 break out)
Sign In or Register to comment.