Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/2/2005 Posts: 30
|
Hi,
I've set MOBO bands up on my charts (bollinger bands, period 10, width 8).
Could you write a PCF to identify a breakout above the upper band?
Thanks, Kaveh
|
|
Registered User Joined: 10/2/2005 Posts: 30
|
Forgot to say... could you write one PCF based on weekly charts, and another on daily charts?
Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following:
Daily: C > AVGC10 + .8 * SQR(ABS(C^2 + C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 - 10 * AVGC10^2) / 9) AND C1 < AVGC10.1 + .8 * SQR(ABS(C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 + C10^2 - 10 * AVGC10.1^2) / 9)
Weekly: C > (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) / 10 + .8 * SQR(ABS(C ^ 2 + C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 - (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) ^ 2 / 10) / 9) AND C5 < (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) / 10 + .8 * SQR(ABS(C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 + C50 ^ 2 - (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) ^ 2 / 10) / 9)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/2/2005 Posts: 30
|
Thanks.
As usual worked perfectly.
Keep up the great work!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/14/2005 Posts: 77
|
what about the lower band?
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
I hope I haven’t stepped on anyone’s toes, here are the PCFs for Price Crossing Bollinger Bands, One caveat, I quickly checked most of them, they seem correct. These PCFs should give you most conditions
I recommend your search this topic for other information including these links. http://www.worden.com/training/default.aspx?g=posts&t=14786 http://www.worden.com/training/default.aspx?g=posts&t=13229 http://www.worden.com/training/default.aspx?g=posts&t=12545 http://www.worden.com/training/default.aspx?g=posts&t=9413 http://www.worden.com/training/default.aspx?g=posts&t=873
All PCFs are for Bollinger Bands (10,8) Period : 10 Draw Color : Your Choice Width : 8 Draw Style : Normal Visible : Checked
PCFs No 1 & 2 are Math Formulas, 3-10 are Boolean
Please Use Range Selector Value for PCFs No 1 & 2 The results for the Range Selector from –2 to +2. -2: Crossing down (DN) -1: Crossing down (DN), but hitting the Band exactly 0: Not crossing (or at the Band and staying there) +1: Crossing (UP), but hitting the Band exactly +2: Crossing (UP)
1.Price Crossing UP/DN Upper BB (SGN) (Math)
SGN(C - (AVGC10 + .8 * SQR (ABS (C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 - 10 * AVGC10 ^ 2) / 9))) - SGN(C1 - (AVGC10.1 + .8 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 - 10 * AVGC10.1 ^ 2) / 9)))
2. Price Crossing UP/DN Lower BB (SGN) (Math)
SGN(C - (AVGC10 - .8 * SQR (ABS (C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 - 10 * AVGC10 ^ 2) / 9))) - SGN(C1 - (AVGC10.1 - .8 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 - 10 * AVGC10.1 ^ 2) / 9)))
3. Price Crossing UP Upper BB, Daily:
C > AVGC10 + .8 * SQR(ABS(C^2 + C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 - 10 * AVGC10^2) / 9) AND C1 < AVGC10.1 + .8 * SQR(ABS(C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 + C10^2 - 10 * AVGC10.1^2) / 9)
4. Price Crossing UP Upper BB, Weekly:
C > (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) / 10 + .8 * SQR(ABS(C ^ 2 + C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 - (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) ^ 2 / 10) / 9) AND C5 < (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) / 10 + .8 * SQR(ABS(C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 + C50 ^ 2 - (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) ^ 2 / 10) / 9)
5. Price Crossing DN Upper BB, Daily:
C < AVGC10 + .8 * SQR(ABS(C^2 + C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 - 10 * AVGC10^2) / 9) AND C1 > AVGC10.1 + .8 * SQR(ABS(C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 + C10^2 - 10 * AVGC10.1^2) / 9)
6. Price Crossing DN Upper BB, Weekly:
C < (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) / 10 + .8 * SQR(ABS(C ^ 2 + C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 - (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) ^ 2 / 10) / 9) AND C5 > (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) / 10 + .8 * SQR(ABS(C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 + C50 ^ 2 - (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) ^ 2 / 10) / 9)
7. Price Crossing UP Lower BB, Daily:
C > AVGC10 - .8 * SQR(ABS(C^2 + C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 - 10 * AVGC10^2) / 9) AND C1 < AVGC10.1 - .8 * SQR(ABS(C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 + C10^2 - 10 * AVGC10.1^2) / 9)
8. Price Crossing UP Lower BB, Weekly:
C > (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) / 10 - .8 * SQR(ABS(C ^ 2 + C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 - (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) ^ 2 / 10) / 9) AND C5 < (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) / 10 - .8 * SQR(ABS(C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 + C50 ^ 2 - (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) ^ 2 / 10) / 9)
9. Price Crossing DN Lower BB, Daily:
C < AVGC10 - .8 * SQR(ABS(C^2 + C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 - 10 * AVGC10^2) / 9) AND C1 > AVGC10.1 - .8 * SQR(ABS(C1^2 + C2^2 + C3^2 + C4^2 + C5^2 + C6^2 + C7^2 + C8^2 + C9^2 + C10^2 - 10 * AVGC10.1^2) / 9)
10. Price Crossing DN Lower BB, Weekly:
C < (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) / 10 - .8 * SQR(ABS(C ^ 2 + C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 - (C + C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45) ^ 2 / 10) / 9) AND C5 > (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) / 10 - .8 * SQR(ABS(C5 ^ 2 + C10 ^ 2 + C15 ^ 2 + C20 ^ 2 + C25 ^ 2 + C30 ^ 2 + C35 ^ 2 + C40 ^ 2 + C45 ^ 2 + C50 ^ 2 - (C5 + C10 + C15 + C20 + C25 + C30 + C35 + C40 + C45 + C50) ^ 2 / 10) / 9)
Hope this helps Winnie
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
This may help the newer user, in layman’s terms, this is the formula I use to constructing BB
SMA = Simple Moving Average sd = Standard Deviation
All Daily BB Formulas Price of Upper BB : SMA + sd * SQR(ABS(C^2+C1^2…C9^2 - Pds * SMA^2) / Periods - 1) Price of Middle BB : SMA Price of Lower BB : SMA - sd * SQR(ABS(C^2+C1^2…C9^2 - Pds * SMA^2) / Periods - 1)
To Change for Price Above or Below Upper or Lower BB, add and start with C> or Below LR C<
Upper Band: AVGC10 + .8 * SQR (ABS (C^2 + C1^2 + C2^2 + C3^2 + C4^2 + C5^2 +C6^2 + C7^2 + C8^2 + C9^2 - 10 * AVGC10^2) / 9)
Lower Band: AVGC10 - .8 * SQR (ABS (C^2 + C1^2 + C2^2 + C3^2 + C4^2 + C5^2 +C6^2 + C7^2 + C8^2 + C9^2 - 10 * AVGC10^2) / 9)
Please note the only difference between the Upper and Lower Band is the minus ( - ) sign before the sd,
Winnie
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Good stuff.
Thanks Winnie
|
|
Guest-1 |