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.

How to omit OTC stocks

Fairly happy with my scans but occasionally an OTC stock is filtered in and I don't want them in my review. I added the bottom line and Check Syntax reads as correct and seems to filter them out but a message box remains to the left of this line and reads OTCMKT is an "Unidentified text". Does this pose a problem for the scan?

[type = stock]
and [country is US]
and [group is not ETF]
and [Exchange is not OTCMKT]


Answers

  • The acceptable Exchange values are:
    NYSE, NASDAQ, OTCMKT, PINK, AMEX, TSE, TSXV, CSE, NSE, LSE, ICE, CME, CRYPT

    When I copy your code above and click Check Syntax, I get no errors. When I run it I get results. The advanced editor is being cautious and warning you about a potential issue because you typed over the preset. I think it wants the have PINK in there to make itself happy. I don't know what the difference is between those two, OTCMKT and PINK. Both are listed as acceptable values.
  • Thanks, I also noted OTCBB.

    What's the difference in the nomenclature of this code?
  • The list I gave is from the StockCharts.com help for Ticker Properties in scans.

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

    I don't know about OTCBB and don't find anything in the Support area about it. It returns no results if you use it in a scan.
  • In general, it's probably better to specify positively what you do want, even if it's more work, rather than exclude what you don't want (although sometimes there is no choice, as in [group is not ETF] ). That way, if new exchanges or symbol groupings or types are added, they don't creep into your results without you knowing about it.

    If you are interested in US stocks only, it might be easier to specify the three major exchanges rather than exclude one or more other exchanges. You would use an "or" statement for that:

    and [

    [exchange is NYSE]

    or

    [exchange is NASD]

    or

    [exchange is AMEX]

    ]

    If you wanted Canadian or overseas stocks, just add them to the list.
  • Great idea, I'll change it to pull them in exclusively.

    Thanks


Sign In or Register to comment.