Registered User Joined: 3/31/2011 Posts: 90
|
I'm creating 2 scans for stocks that closed outside the upper / lower BBs (20,2.0) then retraced. I'll work on the retrace separately but can I get 2 PCF conditions for close outside upper/lower band 2 days ago please.
Also is it practical to write a PCF for price closing within Keltner Channels 20,1.0. I know it can be done from the chart but would prefer PCF if not too long to create a column.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Price outside the Bollinger Bands 20, 2.00 from 2 bars ago is fairly simple.
ABS(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)
Above is about the same:
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)
As is below:
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)
A Condition Formula for price being inside the exponential Kelter Channels 20, 1.00 currently can be written as follows.
ABS(C - (XAVGH20 + XAVGL20 + XAVGC20) / 3) <= (XAVGH20 - XAVGL20 + .095324514 * ((H < C1) * (H - C1) + (C1 < L) * (C1 - L) + 19 / 21 * ((H1 < C2) * (H1 - C2) + (C2 < L1) * (C2 - L1) + 19 / 21 * ((H2 < C3) * (H2 - C3) + (C3 < L2) * (C3 - L2) + 19 / 21 * ((H3 < C4) * (H3 - C4) + (C4 < L3) * (C4 - L3) + 19 / 21 * ((H4 < C5) * (H4 - C5) + (C5 < L4) * (C5 - L4) + 19 / 21 * ((H5 < C6) * (H5 - C6) + (C6 < L5) * (C6 - L5) + 19 / 21 * ((H6 < C7) * (H6 - C7) + (C7 < L6) * (C7 - L6) + 19 / 21 * ((H7 < C8) * (H7 - C8) + (C8 < L7) * (C8 - L7) + 19 / 21 * ((H8 < C9) * (H8 - C9) + (C9 < L8) * (C9 - L8) + 19 / 21 * ((H9 < C10) * (H9 - C10) + (C10 < L9) * (C10 - L9) + 19 / 21 * ((H10 < C11) * (H10 - C11) + (C11 < L10) * (C11 - L10) + 19 / 21 * ((H11 < C12) * (H11 - C12) + (C12 < L11) * (C12 - L11) + 19 / 21 * ((H12 < C13) * (H12 - C13) + (C13 < L12) * (C13 - L12) + 19 / 21 * ((H13 < C14) * (H13 - C14) + (C14 < L13) * (C14 - L13) + 19 / 21 * ((H14 < C15) * (H14 - C15) + (C15 < L14) * (C15 - L14) + 19 / 21 * ((H15 < C16) * (H15 - C16) + (C16 < L15) * (C16 - L15) + 19 / 21 * ((H16 < C17) * (H16 - C17) + (C17 < L16) * (C17 - L16) + 19 / 21 * ((H17 < C18) * (H17 - C18) + (C18 < L17) * (C18 - L17) + 19 / 21 * ((H18 < C19) * (H18 - C19) + (C19 < L18) * (C19 - L18) + 19 / 21 * ((H19 < C20) * (H19 - C20) + (C20 < L19) * (C20 - L19) + 19 / 21 * ((H20 < C21) * (H20 - C21) + (C21 < L20) * (C21 - L20) + 19 / 21 * ((H21 < C22) * (H21 - C22) + (C22 < L21) * (C22 - L21) + 19 / 21 * ((H22 < C23) * (H22 - C23) + (C23 < L22) * (C23 - L22) + 19 / 21 * ((H23 < C24) * (H23 - C24) + (C24 < L23) * (C24 - L23) + 19 / 21 * ((H24 < C25) * (H24 - C25) + (C25 < L24) * (C25 - L24) + 19 / 21 * ((H25 < C26) * (H25 - C26) + (C26 < L25) * (C26 - L25) + 19 / 21 * ((H26 < C27) * (H26 - C27) + (C27 < L26) * (C27 - L26) + 19 / 21 * ((H27 < C28) * (H27 - C28) + (C28 < L27) * (C28 - L27) + 19 / 21 * ((H28 < C29) * (H28 - C29) + (C29 < L28) * (C29 - L28) + 19 / 21 * ((H29 < C30) * (H29 - C30) + (C30 < L29) * (C30 - L29) + 19 / 21 * ((H30 < C31) * (H30 - C31) + (C31 < L30) * (C31 - L30) + 19 / 21 * ((H31 < C32) * (H31 - C32) + (C32 < L31) * (C32 - L31) + 19 / 21 * ((H32 < C33) * (H32 - C33) + (C33 < L32) * (C33 - L32) + 19 / 21 * ((H33 < C34) * (H33 - C34) + (C34 < L33) * (C34 - L33) + 19 / 21 * ((H34 < C35) * (H34 - C35) + (C35 < L34) * (C35 - L34) + 19 / 21 * ((H35 < C36) * (H35 - C36) + (C36 < L35) * (C36 - L35) + 19 / 21 * ((H36 < C37) * (H36 - C37) + (C37 < L36) * (C37 - L36) + 19 / 21 * ((H37 < C38) * (H37 - C38) + (C38 < L37) * (C38 - L37) + 19 / 21 * ((H38 < C39) * (H38 - C39) + (C39 < L38) * (C39 - L38) + 19 / 21 * ((H39 < C40) * (H39 - C40) + (C40 < L39) * (C40 - L39) + 19 / 21 * ((H40 < C41) * (H40 - C41) + (C41 < L40) * (C41 - L40) + 19 / 21 * ((H41 < C42) * (H41 - C42) + (C42 < L41) * (C42 - L41) + 19 / 21 * ((H42 < C43) * (H42 - C43) + (C43 < L42) * (C43 - L42) + 19 / 21 * ((H43 < C44) * (H43 - C44) + (C44 < L43) * (C44 - L43) + 19 / 21 * ((H44 < C45) * (H44 - C45) + (C45 < L44) * (C45 - L44) + 19 / 21 * ((H45 < C46) * (H45 - C46) + (C46 < L45) * (C46 - L45) + 19 / 21 * ((H46 < C47) * (H46 - C47) + (C47 < L46) * (C47 - L46) + 19 / 21 * ((H47 < C48) * (H47 - C48) + (C48 < L47) * (C48 - L47) + 19 / 21 * ((H48 < C49) * (H48 - C49) + (C49 < L48) * (C49 - L48) + 19 / 21 * ((H49 < C50) * (H49 - C50) + (C50 < L49) * (C50 - L49) + 19 / 21 * ((H50 < C51) * (H50 - C51) + (C51 < L50) * (C51 - L50) + 19 / 21 * ((H51 < C52) * (H51 - C52) + (C52 < L51) * (C52 - L51) + 19 / 21 * ((H52 < C53) * (H52 - C53) + (C53 < L52) * (C53 - L52) + 19 / 21 * ((H53 < C54) * (H53 - C54) + (C54 < L53) * (C54 - L53) + 19 / 21 * ((H54 < C55) * (H54 - C55) + (C55 < L54) * (C55 - L54) + 19 / 21 * ((H55 < C56) * (H55 - C56) + (C56 < L55) * (C56 - L55) + 19 / 21 * ((H56 < C57) * (H56 - C57) + (C57 < L56) * (C57 - L56) + 19 / 21 * ((H57 < C58) * (H57 - C58) + (C58 < L57) * (C58 - L57) + 19 / 21 * ((H58 < C59) * (H58 - C59) + (C59 < L58) * (C59 - L58) + 19 / 21 * ((H59 < C60) * (H59 - C60) + (C60 < L59) * (C60 - L59) + 19 / 21 * ((H60 < C61) * (H60 - C61) + (C61 < L60) * (C61 - L60) + 19 / 21 * ((H61 < C62) * (H61 - C62) + (C62 < L61) * (C62 - L61) + 19 / 21 * ((H62 < C63) * (H62 - C63) + (C63 < L62) * (C63 - L62) + 19 / 21 * ((H63 < C64) * (H63 - C64) + (C64 < L63) * (C64 - L63) + 19 / 21 * ((H64 < C65) * (H64 - C65) + (C65 < L64) * (C65 - L64) + 19 / 21 * ((H65 < C66) * (H65 - C66) + (C66 < L65) * (C66 - L65) + 19 / 21 * ((H66 < C67) * (H66 - C67) + (C67 < L66) * (C67 - L66) + 19 / 21 * ((H67 < C68) * (H67 - C68) + (C68 < L67) * (C68 - L67) + 19 / 21 * ((H68 < C69) * (H68 - C69) + (C69 < L68) * (C69 - L68) + 19 / 21 * ((H69 < C70) * (H69 - C70) + (C70 < L69) * (C70 - L69))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 3/31/2011 Posts: 90
|
Ideal. Thankyou
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|