Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Bollinger %B Condition formula Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
BillJohnson
Posted : Monday, January 16, 2012 5:15:57 PM
Registered User
Joined: 10/7/2004
Posts: 16
I am attempting to code in one of Larry Connors' ETF strategies.  The %b Strategy calls for looking for an ETF where the %b closes under 0.2 for 3 consecutive days.  Searching for those ETFs where %b is under 0.2 today is simple enough but how do you scan for those that closed under that level for the previous 2 days?  Also, why doesn't the Version 12 PCF coding box provide the assistance that previous versions provided?  Thanks.
Bruce_L
Posted : Tuesday, January 17, 2012 8:25:45 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You would need to create a Condition Formula which would depend on the exact settings of your Bollinger Bands %B. For example, for a Period of 20 and a Std Dev of 2.00, the Condition Formula could be written as:

(C - AVGC20) / 4 / 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) + .5 < .2 AND (C1 - AVGC20.1) / 4 / SQR(ABS(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 + C20 ^ 2 - 20 * AVGC20.1 ^ 2) / 20) + .5 < .2 AND (C2 - AVGC20.2) / 4 / SQR(ABS(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 + C20 ^ 2 + C21 ^ 2 - 20 * AVGC20.2 ^ 2) / 20) + .5 < .2

Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.