Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 8/23/2012 Posts: 59
|
Hi,
Can you provide a PCF for:
-Price 1 Bar ago crossing up Chan Top Bollinger Band (20 2) ?
Thanks so much.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Assuming that you mean the close of one bar ago was above the upper bollinger band, the close of two bars ago was at or below the upper bolllinger band and the bollinger bands are simple:
C1 > AVGC20.1 + 2 * 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) AND C2 <= AVGC20.2 + 2 * 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)
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/23/2012 Posts: 59
|
More specifically the conditions are:
-close 1 Bar ago below BB
-open 1 Bar ago above BB
-close 2 Bars ago above BB
-BB are simple
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Wouldn't that be crossing down instead of crossing up?
ABS((O1 + C1) / 2 - (AVGC20.1 + 2 * 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))) < (O1 - C1) / 2 AND C2 > AVGC20.2 + 2 * 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)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/23/2012 Posts: 59
|
Yes, you're right it's a cross down :)
So the last PCF you posted fullfils:
-close 1 Bar ago below BB
-open 1 Bar ago above BB
-close 2 Bars ago above BB
-BB are simple
?
Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Yes, that's what the Condition Formula was written to identify.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/23/2012 Posts: 59
|
Thanks Bruce.
Could you provide me also the PCF for the cross up of the Chan Bottom Bollinger Band (20 2) ?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Assuming the definition is just an inverse of your previous request:
ABS((C1 + O1) / 2 - (AVGC20.1 - 2 * 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))) < (C1 - O1) / 2 AND C2 < AVGC20.2 - 2 * 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)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/23/2012 Posts: 59
|
Thanks Bruce, really appreciated.
|
|
Registered User Joined: 7/18/2011 Posts: 16
|
Hello Bruce:
Is there a way to express the difference betwen closing pice (hourly) and uper bollinger band (20 hours, 3 standard dviations) as a percentage (%) of closing price? I use TC 2000 platinum. Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The following Indicator Formula should return the desired percentage. You just need to set the time frame of the formula to hourly in order for the result to be calculated using hourly bars.
100 * (C - (AVGC20 + 3 * 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) )) / C
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/18/2011 Posts: 16
|
I get a "error in formula- Syntax Error" message when I tried to copy and paste the formula in TC 2000. Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The formula is correct and should not produce an error message. What are the exact steps you are using to copy and paste the formula into TC2000?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/18/2011 Posts: 16
|
Thanks. I think I did not copy and paste right. It works now. I appreciate your help.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |