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.

Compressed Prices Scan (Bollinger, StdDev)

willvvwillvv
edited August 2017 in Scanning
Hi,

I'm wondering, would there be a way to scan for stocks prices that are currently compressed, as shows in this chart:

https://www.screencast.com/t/bBvCIv2Gx

Basically, by 'compressed' I mean that Bollinger Bands 30,3 are currently very tight, and (daily) prices are in-between, as per example.

(please note, example shows 15min chart, but we looking for daily here)

Is this possible with StockCharts, at all?

Thanking in advance for your help!

Comments

  • You could test for BB Width(?,?) less than some per cent you think is narrow. You could do that for one particular date, or over some period of time with max(?, BB Width(? ?)) < ?

    If you are not familiar with BB Width, it is explained in Chart School. You can select and insert it from the Technical Indicators drop down on the advanced scan workbench.
  • willvvwillvv
    edited August 2017
    Thank you Mark, once again.

    BB Width would be something I need here indeed. I've studied what StockCharts has to say about it, and tried figuring how to apply their example formula:

    ---

    [type = stock] AND [country = US]
    AND [Daily SMA(20,Daily Volume) > 40000]
    AND [Daily SMA(60,Daily Close) > 20]

    AND [Daily BB Width(20,2) > Yesterday's max(5, BB Width(20,2)) * 2]

    ---

    I can't seem to crack the code on this one...

    First, the % width, to my understanding, might not be an option to be set, as $200+ and $10 stocks would have different % squeezes applied. 5% squeeze on one would be huge, while on another 5% would play little.

    Is there a way to crack a formula so that today's BB Width is to be compared with a width of number of squeezes to have occured over last 500 days, and a 'squeeze' today would be triggered when BB Width is somewhere near the average smallest squeezes of last 500 days?

    I understand that formulas might not work that way (lack of knowledge here!) but the idea would be it... find a squeeze to stocks at any price levels ($10 or $200+) where squeeze is at a lowest when compared with number of days back (in this case, 500 days)

    Any possible to create something, or near like that? A formula example would be very helpful, if by any chance, just can't seem to understand this one at all...
  • The scan engine returns only symbols. You can't use it to return the numerical values of an indicator at different points in time, or an average value over some span of time because those are values, not symbols.

    If you want to research BB Width values you could either eyeball it on charts for different time spans (e.g. Jan - Dec 2009, Jan-Dec 2010, etc.) or download the price data from the "Past Data" link under the chart on the Chart Workbench and figure out how to calculate the BB Width indicator in Excel, then sort or filter the results to find the extreme values.

    If you want to scan for the lowest value over a period of time, you would use the min(?,? ) function. The first parameter is the lookback period, the second parameter is the value you want to look at - usually an indicator, but it could be a price. So the min BB width for some period of time would be:

    and [min(?, BB Width(?, ?)]
  • and [min(?, BB Width(?, ?)]

    ...will have to be the way. Thank you sir!
  • @willvv

    I should correct the code snippet above:

    It would be

    and [BB Width(?,?) = min(?, BB Width(?,?))]

    Note the *two* parens in the min term - one for min, one for BB Width
  • Got it, thank you!
Sign In or Register to comment.