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.

Scans to EXCLUDE Canada and Small Cap and Mid Cap stocks BUT to include NYSE and ETF's and UK stocks

Please Help!
I am trying to build a Bullish divergence scan to exclude Canada (& TSE300) and US Small Cap and US Mid Cap stocks BUT to include NYSE and ETF's and UK stocks. I would be very grateful if anyone could advise where I am going wrong in the below.
Thank you

// Bullish divergence - slope of price negative, slope of MACD Hist positive

[close > 5]
and [country is US]


AND [exchange = NYSE]

OR [group is Sp500]


AND [country is not canada]

AND [group is not Sp600]
AND [group is not Sp400]
OR [group is NOT TSE300]


or [country = uk]
or [group is etf]
or [[group is TechnologySector] or [group is IndustrialsSector] or [group is ConsDiscretionarySector]]

AND [Daily SMA(20,Daily Volume) > 40000]
and [slope(20) < 0]
and [slope(20,MACD Hist(12,26,9)) > 0.0]


Comments

  • Try this:


    // begin universe section

    [type = stock] // you need this to avoid getting index symbols

    //include NYSE and ETF's and UK stocks.

    and

    [ // begin OR statement

    [exchange is NYSE] or [exchange is LSE] or [group is ETF]

    ] // end OR statement

    //exclude Canada (& TSE300) and US Small Cap and US Mid Cap stocks

    and [country is not Canada]

    and [group is not TSE300]

    and [group is not sp400]

    and [group is not sp600]

    // end universe section

    So this will get you -

    Any ETF (except Canadian origin ETFs, if any) no matter where it is traded

    Any stock traded on the NYSE except sp400, sp500, Canadian or TSE300 stocks (if any)

    Any stock traded on the LSE except sp400 (if any), sp500 (if any), Canadian or TSE300 stocks (if any).

    Notice you have to use extra brackets [ [ ...or... ] ] around your 'or' statements if you want them to be treated together as one condition of several.
  • Markd
    You are a legend.
    Thank you
    Damien
Sign In or Register to comment.