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

Anyone can advise me how to draft the scanning criteria?

I am seeking help for writing the scanning criteria for the following:

1. Scan only from my saved chart lists.

2. For defining uptrend - 10 SMA (close) is above 20 SMA (close), 20 SMA (close) is above 40 SMA (close), 40 SMA (close) is above 200 SMA (close)

a) Once an uptrend is defined, the setup for the trade is - price is in between 20 SMA(close) and 40 SMA(close), CCI is >= -100. ( Note : CCI parameter is 5)

Or

b)Once an uptrend is defined, the setup to for the trade is - price is in between 10 SMA(close) and 20 SMA(close), CCI is >= -100. ( Note : CCI parameter is 5)


3. For defining downtrend - 10 SMA (close) is below 20 SMA (close), 20 SMA (close) is below 40 SMA (close), 40 SMA (close) is below 200 SMA (close)

a) Once the downtrend is defined, the setup for the trade is - price is in between 20 SMA(close) and 40 SMA(close), CCI is >= 100. ( Note : CCI parameter is 5)

Or

b)Once a downtrend is defined, the setup for the trade is - price is in between 10 SMA(close) and 20 SMA(close), CCI is >= 100. ( Note : CCI parameter is 5)

Comments

  • Options
    markdmarkd mod
    edited May 2017
    @tsben88 I would recommend that you split this up into several simple scans so you don't have to deal with the more complex "or" conditions. Also, its easier to deal with results when they all meet one particular condition or set of conditions.

    The first part will be common to all the scans, namely, to list all your chart lists that you want to scan. You have to name each list separately.

    To do this, select each list from the "Chartlists" drop down in the Scan Builder section on the Advanced Scan page. In the Scan Criteria window, you will get something like this (these are a few of my own list names; yours will be different):

    and [favorites list is 3] // 10 10 01 00 Energy
    and [favorites list is 9] // 15 10 01 00 Materials
    and [favorites list is 34] // 20 20 001 00 Industrials

    If you leave it like that, you will get no hits ever, because no stock will be in more than one list (usually). So, you have to edit these lines into an "or" statement so the scan engine will take a stock that is in any one list (as long as it meets the other conditions).

    [
    or [favorites list is 3] // 10 10 01 00 Energy
    or [favorites list is 9] // 15 10 01 00 Materials
    or [favorites list is 34] // 20 20 001 00 Industrials
    ]

    Note the extra pair of brackets around the group of favorites list lines. You must have those.

    Now to define the up trend you just need a series of statements the require one sma to be greater than another. So, just as you selected your lists from the Scan Builder and edited, you can select technical indicators and overlays from the "Technical Indicators" drop down.

    So the SMA indicator will look like this:

    and [SMA(50,volume) > 9999999]

    So now you have to edit that. We are dealing with 10, 20, 40 and 100 MAs of close, so the first thing we want to edit is "volume" to "close".

    and [SMA(50,close) > 9999999]

    Now, we want to compare the 10 to the 20, so

    second step
    and [SMA(10,close) > 9999999]

    third stop
    and [SMA(10,close) > SMA(10,close)]

    done
    and [SMA(10,close) > SMA(20,close)]

    Now repeat that for each comparison you want to make.

    For the close condition, it's just close > one sma and close < another sma.

    For the CCI condition, same process: select CCI from the Technical Indicators drop down and edit it.

    For rules of syntax, go here:

    http://stockcharts.com/docs/doku.php?id=scans:advanced_scan_syntax

    For an intro to the scanning page, go here:

    http://stockcharts.com/docs/doku.php?id=scans:advanced_scan_workbench
  • Options
    Thanks Mark!
Sign In or Register to comment.