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

Condition Formula Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jchudnoff
Posted : Thursday, August 1, 2013 3:28:38 PM
Registered User
Joined: 6/17/2010
Posts: 12

I want to create a condition that shows the Bollinger Bands 20 2 channel top price history crossing

down through the Keltner Channel top band five (5) days ago  AND the Bollinger Bands 20 2 channel

bottom price history crossing up through the Keltner Channel bottom band five (5) days ago.

thank you

Jack Chudnoff    

Michael_T
Posted : Thursday, August 1, 2013 3:38:03 PM


Worden Trainer

Joined: 10/7/2004
Posts: 710

Jack,

In TC2000 12.3 this is easy IF you are looking for those crosses today (not five days ago). This can be done quite simply by creating the two conditions from our charts. I can help you with that if you like.

The five days ago part requires rather extensive PCFs. I'll have you review this post and this one to get an idea. 

jchudnoff
Posted : Thursday, August 1, 2013 3:51:40 PM
Registered User
Joined: 6/17/2010
Posts: 12

I have the formula for crossing today.  It's the 5 days ago that I don't have.  I have a formula that shows when the crossing is first happening, but then I need something that tracks it from first crossing to when it fires.  I believe  that the TTM squeeze shown in one of the posts you showed me is probably what I want.  But looks so complicated!

jchudnoff
Posted : Thursday, August 1, 2013 4:08:22 PM
Registered User
Joined: 6/17/2010
Posts: 12

Michael,  In case I wasn't clear, I would most certainly appreciate your help in obtaining this condition formula.

 

Jack

Bruce_L
Posted : Monday, August 5, 2013 1:21:55 PM


Worden Trainer

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

Keeping in mind that Bollinger Bands and Keltner Channels do not have the same centerline (so the crossovers need not be simultaneous), a Condition Formula for Simple Bollinger Bands 20, 2.00 being completely contained by Exponential Keltner Channels 20, 1.5 5-bars ago but where at least part of the Bollinger Bands were outside the Keltner Channels 6-bars ago could be written as:

AVGC20.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 - 20 * AVGC20.5 ^ 2) / 20) <= (XAVGH20.5 + XAVGL20.5 + XAVGC20.5) / 3 + 1.5 * (XAVGH20.5 - XAVGL20.5 + .09532451 * ((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) + 19 / 21 * ((H70 < C71) * (H70 - C71) + (C71 < L70) * (C71 - L70) + 19 / 21 * ((H71 < C72) * (H71 - C72) + (C72 < L71) * (C72 - L71) + 19 / 21 * ((H72 < C73) * (H72 - C73) + (C73 < L72) * (C73 - L72) + 19 / 21 * ((H73 < C74) * (H73 - C74) + (C74 < L73) * (C74 - L73) + 19 / 21 * ((H74 < C75) * (H74 - C75) + (C75 < L74) * (C75 - L74)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) AND AVGC20.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 - 20 * AVGC20.5 ^ 2) / 20) >= (XAVGH20.5 + XAVGL20.5 + XAVGC20.5) / 3 - 1.5 * (XAVGH20.5 - XAVGL20.5 + .09532451 * ((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) + 19 / 21 * ((H70 < C71) * (H70 - C71) + (C71 < L70) * (C71 - L70) + 19 / 21 * ((H71 < C72) * (H71 - C72) + (C72 < L71) * (C72 - L71) + 19 / 21 * ((H72 < C73) * (H72 - C73) + (C73 < L72) * (C73 - L72) + 19 / 21 * ((H73 < C74) * (H73 - C74) + (C74 < L73) * (C74 - L73) + 19 / 21 * ((H74 < C75) * (H74 - C75) + (C75 < L74) * (C75 - L74)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) AND (AVGC20.6 + 2 * SQR(ABS(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 - 20 * AVGC20.6 ^ 2) / 20) > (XAVGH20.6 + XAVGL20.6 + XAVGC20.6) / 3 + 1.5 * (XAVGH20.6 - XAVGL20.6 + .09532451 * ((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) + 19 / 21 * ((H70 < C71) * (H70 - C71) + (C71 < L70) * (C71 - L70) + 19 / 21 * ((H71 < C72) * (H71 - C72) + (C72 < L71) * (C72 - L71) + 19 / 21 * ((H72 < C73) * (H72 - C73) + (C73 < L72) * (C73 - L72) + 19 / 21 * ((H73 < C74) * (H73 - C74) + (C74 < L73) * (C74 - L73) + 19 / 21 * ((H74 < C75) * (H74 - C75) + (C75 < L74) * (C75 - L74) + 19 / 21 * ((H75 < C76) * (H75 - C76) + (C76 < L75) * (C76 - L75)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) OR AVGC20.6 - 2 * SQR(ABS(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 - 20 * AVGC20.6 ^ 2) / 20) < (XAVGH20.6 + XAVGL20.6 + XAVGC20.6) / 3 - 1.5 * (XAVGH20.6 - XAVGL20.6 + .09532451 * ((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) + 19 / 21 * ((H70 < C71) * (H70 - C71) + (C71 < L70) * (C71 - L70) + 19 / 21 * ((H71 < C72) * (H71 - C72) + (C72 < L71) * (C72 - L71) + 19 / 21 * ((H72 < C73) * (H72 - C73) + (C73 < L72) * (C73 - L72) + 19 / 21 * ((H73 < C74) * (H73 - C74) + (C74 < L73) * (C74 - L73) + 19 / 21 * ((H74 < C75) * (H74 - C75) + (C75 < L74) * (C75 - L74) + 19 / 21 * ((H75 < C76) * (H75 - C76) + (C76 < L75) * (C76 - L75)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
 


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jchudnoff
Posted : Monday, August 5, 2013 1:30:20 PM
Registered User
Joined: 6/17/2010
Posts: 12

Bruce,  

Thank you.  I couldn't possibly transfer that formula to TC2000 by hand.   I would need to be able to highlight it and copy/paste.  Is that a possibility?

 

Jack

Bruce_L
Posted : Monday, August 5, 2013 1:32:38 PM


Worden Trainer

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

Yes, you can highlight the formula and then right-click and select Copy in most browsers to copy the formula into the Windows clipboard. You can click in the Edit Formula window when creating a Condition Formula and select CTRL-V on your keyboard to paste the formula from the Windows clipboard into TC2000.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jchudnoff
Posted : Tuesday, August 6, 2013 2:42:23 PM
Registered User
Joined: 6/17/2010
Posts: 12

Amazing.  I pasted it into the window creating a formula and tested it as per prompt and it came up as "formula error".

It took longer than usual to test because of the length of the formula I suppose.  Assuming the error could be found, could this be  practical to use in a scan of  many stocks at once?

Is it possible to find the error?

 

thanks,

 

Jack

jchudnoff
Posted : Tuesday, August 6, 2013 2:48:38 PM
Registered User
Joined: 6/17/2010
Posts: 12

Is it possible to achieve what i want with some simpler variation of the price crossing the bands today?  I have the simple formula for when they cross in today and when they cross out today.  I want to see the continuous tracking of the price from when it enters until it exits.

 

Jack

Bruce_L
Posted : Tuesday, August 6, 2013 3:12:59 PM


Worden Trainer

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

QUOTE (jchudnoff)
Amazing.  I pasted it into the window creating a formula and tested it as per prompt and it came up as "formula error".

It took longer than usual to test because of the length of the formula I suppose.  Assuming the error could be found, could this be  practical to use in a scan of  many stocks at once?

Is it possible to find the error?

If you copy and paste the entire formula and just the formula into TC2000, the formula does not produce a formula error (it was tested both when posted and again after your response). If you are getting an error message, then you are not posting the entire formula and just the formula into TC2000. There is either something extra or something missing (like a parenthesis).

That said, you are probably better off with a shorter formula if you can simplify the requirements.

QUOTE (jchudnoff)
Is it possible to achieve what i want with some simpler variation of the price crossing the bands today?  I have the simple formula for when they cross in today and when they cross out today.

The main reason the formula is so complex is because of the specific restrictions given in your request that both the top and bottom Bollinger Bands need to cross inside the Keltner Channels. The fact that the centerlines of the indicators don't match mean that we need to check for both the bottom and top individually. The fact that you want a cross from outside to inside instead of just checking for the Bollinger Bands being inside the Keltner channels means we have to write formulas for both 5-bars ago and 6-bars ago.

A "standard" Keltner Squeeze condition does not have these requirements and is normally based on simple instead of exponential Keltner bands.

While I can pretty much assure you a significantly shorter formula will not in fact fulfill all of your stated requirements, if you post the formula you have to check for the current bar, I can probably produce a 5-bars ago version of it.

QUOTE (jchudnoff)
I want to see the continuous tracking of the price from when it enters until it exits.

If this is taken literally in that you want a price percent change over the period of the Keltner Squeeze, then it is not going to happen. Any such Indicator Formula would be way too long and slow to be practical or post in the forums.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jchudnoff
Posted : Tuesday, August 6, 2013 9:04:07 PM
Registered User
Joined: 6/17/2010
Posts: 12

How would I post the formula for the current bar so you can make it for 5 bars ago?  ie: the process of copy and paste and transfer etc.

 

Jack

Bruce_L
Posted : Wednesday, August 7, 2013 8:11:24 AM


Worden Trainer

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

Highlight the formula in TC2000 and then select CTRL-C to copy (in some cases right-click and selecting copy might work as well). Then you could use CTRL-V or right-click and paste to get it into your post in the forums.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jchudnoff
Posted : Wednesday, August 7, 2013 1:58:12 PM
Registered User
Joined: 6/17/2010
Posts: 12

Under Conditions I have the conditions for the scan, but cannot access the formulas as there is no edit button next to them..  Is it possible for you to access my computer and find this for me?

Bruce_L
Posted : Wednesday, August 7, 2013 2:15:36 PM


Worden Trainer

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

I cannot access your computer.

If the condition doesn't say Edit or View to the right of the name of the condition when selecting Library | Conditions, then the condition was not created using a formula.

It was most likely created by clicking on an indicator and selecting Create Scan Condition. If so, and if the default name was used for the condition instead of renaming it, I might be able to tell its exact construction based on the name of the condition.

What is the name of the condition?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jchudnoff
Posted : Thursday, August 8, 2013 12:46:54 PM
Registered User
Joined: 6/17/2010
Posts: 12

condition names:  Bollinger Bands 20 2 - Chan Top Price History - Value Crossing Up

                                   Bollilnger Bands 20 2 - Chan Bottom  Price History - Value Crossing Down              

                This scan shows the squeeze firing that day

 

Jack

Bruce_L
Posted : Thursday, August 8, 2013 1:55:26 PM


Worden Trainer

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

This isn't going to be perfect, but it is the closest thing I have been able to come up with so far.

- Select Add Indicator and choose Custom PCF Indicator from the list.
- Set up the Custom PCF Indicator as follows:
-- Period: 1
-- Average Type: Simple
-- Formula: AVGC20.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 - 20 * AVGC20.5 ^ 2) / 20)
-- Label: BB Top

Adding and Moving Indicators

- Click on the Custom PCF Indicator and select Plot New Indicator here...
- Choose Custom PCF Indicator from the list and Scale With BB Top when prompted.
- Set up the Custom PCF Indicator as follows:
-- Period: 20
-- Average Type: Exponential
-- Formula: (H5 + L5 + C5) / 3 + 1.5 * (H5 - L5 + ABS(H5 - C6) + ABS(C6 - L5)) / 2
-- Label: Keltner Top

- Click on the BB Top Custom PCF Indicator and select Create Scan Condition.
- Choose Crossing Down Keltner Top from the Condition drop-down menu.
- Select Save Condition to Library from the list.
- Adjust the name to indicate crossing 5-bars ago and select Save.

Create Conditions from Your Chart

- Change the Label of the BB Top Custom PCF Indicator to BB Bottom.
- And change the Formula to: AVGC20.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 - 20 * AVGC20.5 ^ 2) / 20)

- Change the Label of the Keltner Top Custom PCF Indicator to Keltner Bottom.
- And change the Formula to: (H5 + L5 + C5) / 3 - 1.5 * (H5 - L5 + ABS(H5 - C6) + ABS(C6 - L5)) / 2

- Click on the BB Bottom Custom PCF Indicator and select Create Scan Condition.
- Choose Crossing Up Keltner Bottom from the Condition drop-down menu.
- Select Save Condition to Library from the list.
- Adjust the name to indicate crossing 5-bars ago and select Save.

- You can delete the Custom PCF Indicators once you have created both conditions.

- Select New | EasyScan from the menus.
- Select Add Condition and choose the first Condition you created and saved.
- Select Add Condition and choose the second Condition you created and saved.
- Click the Scan tab.

Build a Scan with Multiple Conditions

This EasyScan should be similar to your existing EasyScan but should work for 5-bars ago instead of the current bar.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jchudnoff
Posted : Thursday, August 8, 2013 4:34:52 PM
Registered User
Joined: 6/17/2010
Posts: 12

Thank you very much.  I received all the emails and will attempt to copy and paste these formulas into the places you indicate.  I'll let you know how I do.

 

Jack

 

jchudnoff
Posted : Thursday, August 8, 2013 7:19:16 PM
Registered User
Joined: 6/17/2010
Posts: 12

Thanks for trying but I can't follow the instructions.  Too complicated and not clear at all.

Bruce_L
Posted : Friday, August 9, 2013 9:06:55 AM


Worden Trainer

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

Each block of text in my Thursday, August 08, 2013 1:55:26 PM ET post constitutes a one of the basic steps required. The links in between some of these steps are to videos giving a demonstration of the how that type of step would generally be performed. Watching the videos can be quite useful in understanding the instructions.

Maybe shortening the instructions will help as it is a lot simpler than it would seem based on the length of the directions (but this will result in the instructions being less "step-by-step" than above).

Create a Custom PCF Indicator for the top Bollinger Band of 5-bars ago using the following Formula:

AVGC20.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 - 20 * AVGC20.5 ^ 2) / 20)

Create a Custom PCF Indicator for the top Keltner Channel of 5-bars ago using the following Formula:

(H5 + L5 + C5) / 3 + 1.5 * (H5 - L5 + ABS(H5 - C6) + ABS(C6 - L5)) / 2

You need to set the Period to 20 and the Average Type to Exponential in the top Keltner Channel of 5-bars ago Custom PCF Indicator (you didn't need to do anything besides enter the formula for the BB Custom PCF Indicator).

Now click on the Custom PCF Indicator for the top Bollinger Band of 5-Bars ago and select Create Scan Condition to create a Condition for the BB Custom PCF Indicator crossing down through the Keltner Channel Custom PCF Indicator. You will want to save this condition so we can use it later.

You can then edit both Custom PCF Indicators to change the first + in each formula to a - instead to switch the Custom PCF Indicators from being for the top bands to being for the bottom bands.

Now click on the Custom PCF Indicator for the BB and select Create Scan Condition to create a Condition for the BB Custom PCF Indicator crossing up through the Keltner Channel Custom PCF Indicator. You will want to save this condition so we can use it later.

Then we create an EasyScan using the two conditions.

To summarize even further:

1. Create a Custom PCF Indicators for the upper BB and Keltner Channels of 5-bars ago

2. Create a condition for the BB Custom PCF Indicator crossing down through the Keltner Channel Custom PCF Indicator.

3. Alter the Custom PCF Indicators to be the lower band instead of the upper band.

4. Create a condition for the BB Custom PCF Indicator crossing up through the Keltner Channel Custom PCF Indicator.

5. Add both conditions to the same EasyScan.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jchudnoff
Posted : Friday, August 9, 2013 4:18:54 PM
Registered User
Joined: 6/17/2010
Posts: 12

sorry I had no time to chech the site today.  I'll try and work on it over the weekend if I can.  Thanks for the additional info.

Jack

Bruce_L
Posted : Friday, August 9, 2013 4:23:27 PM


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.