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.

Missed scans

Hello, I'm wondering why my below daily scan did not pick up CVX or TXN today? Those were two charts I would want this scan to pick up? Any help please?

[type is stock] and [sma(20,volume) > 200000] and [Close > 5] and [region is NorthAmerica]
and [weekly Volume > 2,999,999]
and [[daily Hammer is true]
or [daily Gravestone Doji is true]
or [daily Dragonfly Doji is true]
or [daily Hanging Man is true]
or [daily Shooting Star is true]]

Comments

  • Both seem to fit your non-candle criteria, so the question would be whether they fit any of the candle criteria. They both look like they should fit one of them, but it's possible they don't. The scan has to have a cutoff somewhere and CVX and TXN may just miss the cutoff.

    To test this, make a list that includes TXN and CVX. Then run a simple scan against that list for each candle type only (no volume, etc. conditions), one at a time. If you get no hits, then it's likely the candles on the charts don't match the criteria. You could double check by including in the list some symbols that you know DO match each candle type. If the known candles are hits, but CVX and TXN are not, that would be definitive that CVX and TXN don't match the candle type.
  • gordgord admin
    edited February 2019
    I agree with MarkD, when I looked at the two symbols in question I felt they did not match any of the candlestick requirements. The conditions to be met for a specific candlestick are quite tight, its not enough to be just similar. Use MarkD's suggestion to check each candlestick pattern individually.

    Here's a couple of links to the documentation on the specifics of candlestick patterns.

    https://stockcharts.com/school/doku.php?id=chart_school:chart_analysis:introduction_to_candlesticks#dragonfly_doji

    https://stockcharts.com/school/doku.php?id=chart_school:chart_analysis:candlestick_pattern_dictionary

    If you wanted to broaden the definition of any particular candlestick you could always write your own code. For example a Doji forms when a security's open and close are virtually equal, I'm sure StockCharts uses a very small tolerance on this, say 0.1%. But you could expand this to be, the open and close should be within say 0.5%

  • created isolated list of CVX/TXN and wrote below code (now 1 day ago) and even expanding open/closer greater than 20 (just to test) doesn't capture either of them... ? What am I missing?

    [[1 day ago Open > 2] and [1 day ago Close < 2]]
    and [favorites list is 16] // TEST
  • Candle patterns appear to be multi candle patterns. Seems like everything is in relation to prior activity. I'm definitely NOT a candlestick pro or even a novice but I don't see TXN or CVX meeting any of the pattern requirements you are asking for in the scan. My interpretation is from reviewing the ChartSchool info.
  • StockCharts.com has a page for their Pre-Defined Scans. They list out some different active scans that allow you to click on the number of stocks that meet the scan. They have these for CandleStick patterns about half way down the page.

    https://stockcharts.com/def/servlet/SC.scan
  • markdmarkd mod
    edited February 2019
    Try

    // doji scan

    [favorites list is ...]
    and [daily Hammer is true]

    // end doji scan

    Then try each of the other candle types you are looking for. I'm guessing you will get no results because CVX and TXN probably don't fit the exact requirements for the Stockcharts definitions.

    If you want to try your own definition, it's a little complicated. Part of the definition of a doji depends on whether it is making higher prices in an up leg, or lower prices in a down leg. But, since you are looking for any kind of doji, you could concentrate on just getting a very small body.

    To do that, you would compare the distance between the open and close (the body) to the distance between the high and the low (the range of the whole bar):

    and [ [close - open]/[high - low] < ... ]

    The problem is, if you just write the scan this way the difference [close - open] is negative if the open is above the close, and comparing a negative value for the body to a positive value for the range won't give you a reliable result. You need a positive number for the body.

    There is a function called absval( ), but it only works for indicators with a negative value. It doesn't work with operations like subtraction.

    So, you have to write the scan to get a positive number for both situations - close above open or open above close.

    // begin narrow body scan
    [favorites list is ...] // your list

    and

    [
    // close is above open
    [
    [ close > open]
    and [ [close - open] < [high - low]*0.2] // body less than 20% of range, or use .1 (10%), .05 (5%), .01 (1%), etc.

    ]

    or
    // open is above close
    [
    [open > close]
    and [ [open - close] < [high-low]*0.2]
    ]

    or

    [ close = open ] // rare, but could happen


    ]
    // end narrow body scan


    Hint: don't type in "[favorites list is ...]. Instead, select the list from the ChartLists dropdown and cut and paste it to the TOP of the scan. Also, be careful with the brackets. Don't leave any out.
Sign In or Register to comment.