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.

Slow Stoch Weekly Scan for stocks > 50 OR 200 EMA

Hiu chartists,

I am looking to create a scan for the following:

Stocks > either 50 or 200 EMA
and where the Slow Stoch crosses 20
Last week it was less than 20

The below generates zero results - all theories why are welcome
thank you



// ASIDE TO ENSURE SPEED OF SCAN PROCESSING, SET UP SCAN IN THE FOLLOWING ORDER

// Fantastic SCAN inst link stockcharts.com/docs/doku.php?id=scans:advanced_scan_syntax



// TYPE DCR insert here if relevant AND [type is stock]}

// GROUP

[[type = stock] and [market cap > 2000]] // note the double [[ ]" here- rationale here is that the stock and market cap are combined - ie the mktcap restriction does not apple to other criteria


OR
[type is index]
OR

[Group is ETFNOUI] // include ETF's BUT EXCLUDE Ultras and inverse ETF's

OR

[Exchange is CME]
OR
[[exchange is LSE] and [market cap > 10000]]



AND


[group is not Sp600] // this is probably irrelevant as I have stated above Mkt cap > 2000


AND [group is not Sp400]
AND [country is not canada]
AND [group is NOT TSE300]


and [exchange is NOT NSE]
and [exchange is NOT OTCMKT]
and [exchange is not TSE]


// COUNTRY

and [country is not Canada] // this is probably irrelevant as I have stated above "exchange is not TSE"



// STARTS/ENDS/CONTAINS


// AND [Daily SMA(20,Daily Volume) > 40000] this is excluded as it would mean that indices would be ignored

AND [close > 3]


// DCR ENTER PARAMETRES NEXT

// This identifies stocks that are > 50 or 200 EMA

and [today's close > today's ema(50, close)]
OR [today's close > today's ema(200, close)]


// This identifies a Slo Sto that has had a positive crossover its signal line

and [weekly slow stoch %k(14,3) >= weekly slow stoch %d(14,3)]
and [last weeks slow stoch %k(14,3) < last weeks slow stoch %d(14,3)]
and [2 weeks ago Weekly slow stoch %k(14,3) < 2 weeks ago Weekly slow stoch %d(14,3)]
and [3 weeks ago Weekly slow stoch %k(14,3) < 3 weeks ago Weekly slow stoch %d(14,3)]


// This identifies a Slo Sto that has had a positive crossover the "20" Line BUT is less than "25" in order to reduce the number of results

AND[weekly slow stoch %k(14,3) > 20]
AND[weekly slow stoch %k(14,3) < 25]



//This ensures we get a positive IT and LT Trend Model configuration
AND [today's ema(20,close) > today's ema(50,close)]
AND [today's ema(50,close) > today's ema(200,close)]


Rank by "marketcap"

// end universe section

Comments

  • This is a very ambitious scan.

    First, you need to check your "OR" parentheses to make sure everything is grouped correctly. I think you need and opening bracket before the very first statement, and a closing bracket after exchange is LSE and before group is not sp600. But I didn't test this.

    Also, this

    and [today's close > today's ema(50, close)]
    OR [today's close > today's ema(200, close)]

    should be

    and
    [
    [today's close > today's ema(50, close)]
    OR
    [today's close > today's ema(200, close)]
    ]

    It's always a good idea to put in first the brackets that go around the alternative conditions of the "OR" statement, then the alternative conditions inside. You can event make a template and save it in a text editor or word processor. The format (separate line for each "or" bracket) helps keep things straight.

    and // unless the "or" statement is the first condition of the scan, then no leading "and"

    [

    [ condition 1]

    OR

    [condition 2]

    OR
    ...


    ]


    and // unless the "or" statement is the final condition, or the last before "rank by"




    You may be getting zero results because you are asking for two simultaneous crossovers (above Signal and above 20) within a restricted range. That's probably a relatively rare event. But you could try editing the "or" statements first, and then maybe expanding the range, or asking for one or the other crossover.

Sign In or Register to comment.