Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

PCF for Upper Bollinger Band (20 2) cross up ? Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Gano
Posted : Friday, March 8, 2013 7:40:36 AM
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.

Bruce_L
Posted : Friday, March 8, 2013 7:50:08 AM


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
Gano
Posted : Friday, March 8, 2013 8:11:19 AM
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

Bruce_L
Posted : Friday, March 8, 2013 8:24:01 AM


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
Gano
Posted : Friday, March 8, 2013 9:18:17 AM
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.

Bruce_L
Posted : Friday, March 8, 2013 9:21:15 AM


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
Gano
Posted : Friday, March 8, 2013 3:18:58 PM
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) ?

 

Bruce_L
Posted : Friday, March 8, 2013 3:21:50 PM


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
Gano
Posted : Friday, March 8, 2013 3:45:01 PM
Registered User
Joined: 8/23/2012
Posts: 59

Thanks Bruce, really appreciated.

nxasokan
Posted : Monday, January 18, 2016 1:38:48 PM
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.

Bruce_L
Posted : Tuesday, January 19, 2016 3:37:22 PM


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
nxasokan
Posted : Tuesday, January 19, 2016 10:19:44 PM
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.

Bruce_L
Posted : Wednesday, January 20, 2016 10:22:24 AM


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
nxasokan
Posted : Wednesday, January 20, 2016 11:15:54 AM
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.

Bruce_L
Posted : Wednesday, January 20, 2016 11:16:44 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-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.