munney_dummy |
Gold User, Member, TeleChart
|
Registered User |
|
|
|
|
Gender: |
|
Sunday, August 28, 2011 |
Saturday, December 15, 2012 1:47:08 PM |
3 [0.00% of all post / 0.00 posts per day] |
|
Sorry for the repeated posts in the same thread but I am working my way through this step by step. I now have an indicator that flags a candlestick outside the BB, following a bar inside the bands. If I want to add a condition that the next bar be inside the bands how would I change it?
In other words, the indicator I want to code is: a day within BB, followed by a day crossing out and finally with a day where open and close are both within the bands again.
Thanks for the help.
|
Okay, I think I got it. For those wanting to use the above formula, just past the AND there is a "ABS(C1 - AVGC20.1" that requires a perenthesis after it.
|
For price crossing out of the bands (pasted here from Bruce L's post):
ABS(C - AVGC20) > 2 * 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) / 19) AND ABS(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) / 19)
I am getting mismatched parenthesis error. Can you see where to correct? Thanks.
|
|