Registered User Joined: 10/1/2012 Posts: 8
|
Hi, I would like to know how to develop a scan to capture a price point below the lower Bollinger band. I know that if the condition doesn't exist at the moment I am scanning then the stock will not appear in the scan results. I would, however, like to see that situation in a scan result. So if the condition existed earlier today I would like to know how I would write the scan to capture the situation regardless of whether or not it is true now. What would the scan requirement look like?
I look forward to your reply.
Thank you
Beliveau
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you want to know if the price of the current bar was ever below the current lower Bollinger Band, you could just check for the low to be below the current lower Bollinger Band. In the case of Simple Bollinger Bands 20, 2.00, this could be written as:
L < AVGC20 + 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20)
Note however at the time of the low, both the center of the Bollinger Bands and the width of the Bollinger Bands would have been slightly different. If you want to take this into account, then you might want to try the following instead:
L < (L + 19 * AVGC19.1) / 20 + 2 * SQR(ABS(L ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * ((L + 19 * AVGC19.1) / 20) ^ 2) / 20)
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
-Bruce Personal Criteria Formulas TC2000 Support Articles
|