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

Bollinger Bands Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ciddan
Posted : Thursday, August 22, 2013 4:51:02 PM
Registered User
Joined: 10/17/2011
Posts: 12

Hi,

I have a question on Bollinger Bands, and search did not hint me towards the right answers.

I want to create a scan condition that looks for the following:

Price Moving Linear Reg. (10) and Moving Lin Reg (30) were all inside of a 30.2 Bollinger Band a week ago. 

My first idea was to go into the chart and create the scan condition "Moving Lin Reg 10 above BBands 30.2" as well as "...below BBand 30.2" and then see if I can edit the code to look back 5 days, but under "my conditions" there is only this criteria without the 'edit' function to see the code and add the lookback. So your help is much appreciated.

Also, is it possible to compare the width of todays Bollinger Band to the width of x days ago and create a scan condition, for example that todays width is at least 20% smaller than 2 weeks ago?

Many thanks for your help,

Frank

Bruce_L
Posted : Thursday, August 22, 2013 5:07:56 PM


Worden Trainer

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

QUOTE (ciddan)
Price Moving Linear Reg. (10) and Moving Lin Reg (30) were all inside of a 30.2 Bollinger Band a week ago.

Please try the following Condition Formula:

ABS(AVGC10.5 + 4.5 * (4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14) / 82.5 - AVGC30.5) <= 2 * SQR(ABS(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 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 + C25 ^ 2 + C26 ^ 2 + C27 ^ 2 + C28 ^ 2 + C29 ^ 2 + C30 ^ 2 + C31 ^ 2 + C32 ^ 2 + C33 ^ 2 + C34 ^ 2 - 30 * AVGC30.5 ^ 2) / 30) AND ABS(14.5 * (14.5 * C5 + 13.5 * C6 + 12.5 * C7 + 11.5 * C8 + 10.5 * C9 + 9.5 * C10 + 8.5 * C11 + 7.5 * C12 + 6.5 * C13 + 5.5 * C14 + 4.5 * C15 + 3.5 * C16 + 2.5 * C17 + 1.5 * C18 + 0.5 * C19 - 0.5 * C20 - 1.5 * C21 - 2.5 * C22 - 3.5 * C23 - 4.5 * C24 - 5.5 * C25 - 6.5 * C26 - 7.5 * C27 - 8.5 * C28 - 9.5 * C29 - 10.5 * C30 - 11.5 * C31 - 12.5 * C32 - 13.5 * C33 - 14.5 * C34) / 2247.5) <= 2 * SQR(ABS(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 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 + C25 ^ 2 + C26 ^ 2 + C27 ^ 2 + C28 ^ 2 + C29 ^ 2 + C30 ^ 2 + C31 ^ 2 + C32 ^ 2 + C33 ^ 2 + C34 ^ 2 - 30 * AVGC30.5 ^ 2) / 30)

QUOTE (ciddan)
Also, is it possible to compare the width of todays Bollinger Band to the width of x days ago and create a scan condition, for example that todays width is at least 20% smaller than 2 weeks ago?

Please try the following Condition Formula:

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 + C20 ^ 2 + C21 ^ 2 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 + C25 ^ 2 + C26 ^ 2 + C27 ^ 2 + C28 ^ 2 + C29 ^ 2 - 30 * AVGC30 ^ 2) / 30) <= .8 * SQR(ABS(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 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 + C25 ^ 2 + C26 ^ 2 + C27 ^ 2 + C28 ^ 2 + C29 ^ 2 + C30 ^ 2 + C31 ^ 2 + C32 ^ 2 + C33 ^ 2 + C34 ^ 2 - 30 * AVGC30.5 ^ 2) / 30)

Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ciddan
Posted : Thursday, August 22, 2013 5:29:29 PM
Registered User
Joined: 10/17/2011
Posts: 12

Thank you for this quick response!

Pasting the second formula in, I get an error though. May I ask you to double check please?

Thanks again,

Frank

Bruce_L
Posted : Friday, August 23, 2013 8:58:23 AM


Worden Trainer

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

I do not get any error messages when testing or using either formula in TC2000. What error message are you getting specifically?

Make sure you are copying the entire formula (even a missed parenthesis can cause an error) and are not adding anything extra to the formula.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ciddan
Posted : Friday, August 23, 2013 1:55:50 PM
Registered User
Joined: 10/17/2011
Posts: 12

Hi Bruce,

When I paste the formula into the  condition window, I see 'Formula Error' and when testing the formula, it says 'Error in formula, Argument missing near * 

 

Bruce_L
Posted : Friday, August 23, 2013 2:40:39 PM


Worden Trainer

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

My guess is that you are not using standard US Regional settings and are using , as the decimal mark instead of using . as the decimal mark. If so, you need to either change your regional settings are replace the .8 in the formula with a ,8 instead.



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