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

+DI and -DI Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
pcox
Posted : Tuesday, August 31, 2010 4:53:07 PM
Gold Customer Gold Customer

Joined: 1/22/2010
Posts: 12

You may have answered this back in 2004 for but I just could not figure out how to adapt it.  Do you have the PCF formula to determine +DI value for a 7 period, as well as, for a 7 period -DI.  I just need to compute value so I can run create an EasyScan.  If you have already answered this, please just point me to the post/thread.  Thanks!

Bruce_L
Posted : Tuesday, August 31, 2010 5:03:06 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
One way to write a 7-Period +DI would be:

14.2996048056393 * ((H - H1) * (H - H1 > L1 - L) * (H > H1) + 6 / 7 * ((H1 - H2) * (H1 - H2 > L2 - L1) * (H1 > H2) + 6 / 7 * ((H2 - H3) * (H2 - H3 > L3 - L2) * (H2 > H3) + 6 / 7 * ((H3 - H4) * (H3 - H4 > L4 - L3) * (H3 > H4) + 6 / 7 * ((H4 - H5) * (H4 - H5 > L5 - L4) * (H4 > H5) + 6 / 7 * ((H5 - H6) * (H5 - H6 > L6 - L5) * (H5 > H6) + 6 / 7 * ((H6 - H7) * (H6 - H7 > L7 - L6) * (H6 > H7) + 6 / 7 * ((H7 - H8) * (H7 - H8 > L8 - L7) * (H7 > H8) + 6 / 7 * ((H8 - H9) * (H8 - H9 > L9 - L8) * (H8 > H9) + 6 / 7 * ((H9 - H10) * (H9 - H10 > L10 - L9) * (H9 > H10) + 6 / 7 * ((H10 - H11) * (H10 - H11 > L11 - L10) * (H10 > H11) + 6 / 7 * ((H11 - H12) * (H11 - H12 > L12 - L11) * (H11 > H12) + 6 / 7 * ((H12 - H13) * (H12 - H13 > L13 - L12) * (H12 > H13) + 6 / 7 * ((H13 - H14) * (H13 - H14 > L14 - L13) * (H13 > H14) + 6 / 7 * ((H14 - H15) * (H14 - H15 > L15 - L14) * (H14 > H15) + 6 / 7 * ((H15 - H16) * (H15 - H16 > L16 - L15) * (H15 > H16) + 6 / 7 * ((H16 - H17) * (H16 - H17 > L17 - L16) * (H16 > H17) + 6 / 7 * ((H17 - H18) * (H17 - H18 > L18 - L17) * (H17 > H18) + 6 / 7 * ((H18 - H19) * (H18 - H19 > L19 - L18) * (H18 > H19) + 6 / 7 * ((H19 - H20) * (H19 - H20 > L20 - L19) * (H19 > H20) + 6 / 7 * ((H20 - H21) * (H20 - H21 > L21 - L20) * (H20 > H21) + 6 / 7 * ((H21 - H22) * (H21 - H22 > L22 - L21) * (H21 > H22) + 6 / 7 * ((H22 - H23) * (H22 - H23 > L23 - L22) * (H22 > H23) + 6 / 7 * ((H23 - H24) * (H23 - H24 > L24 - L23) * (H23 > H24) + 6 / 7 * ((H24 - H25) * (H24 - H25 > L25 - L24) * (H24 > H25) + 6 / 7 * ((H25 - H26) * (H25 - H26 > L26 - L25) * (H25 > H26) + 6 / 7 * ((H26 - H27) * (H26 - H27 > L27 - L26) * (H26 > H27) + 6 / 7 * ((H27 - H28) * (H27 - H28 > L28 - L27) * (H27 > H28) + 6 / 7 * ((H28 - H29) * (H28 - H29 > L29 - L28) * (H28 > H29) + 6 / 7 * ((H29 - H30) * (H29 - H30 > L30 - L29) * (H29 > H30) + 6 / 7 * ((H30 - H31) * (H30 - H31 > L31 - L30) * (H30 > H31) + 6 / 7 * ((H31 - H32) * (H31 - H32 > L32 - L31) * (H31 > H32) + 6 / 7 * ((H32 - H33) * (H32 - H33 > L33 - L32) * (H32 > H33) + 6 / 7 * ((H33 - H34) * (H33 - H34 > L34 - L33) * (H33 > H34) + 6 / 7 * ((H34 - H35) * (H34 - H35 > L35 - L34) * (H34 > H35) + 6 / 7 * ((H35 - H36) * (H35 - H36 > L36 - L35) * (H35 > H36) + 6 / 7 * ((H36 - H37) * (H36 - H37 > L37 - L36) * (H36 > H37) + 6 / 7 * ((H37 - H38) * (H37 - H38 > L38 - L37) * (H37 > H38) + 6 / 7 * ((H38 - H39) * (H38 - H39 > L39 - L38) * (H38 > H39) + 6 / 7 * ((H39 - H40) * (H39 - H40 > L40 - L39) * (H39 > H40) + 6 / 7 * ((H40 - H41) * (H40 - H41 > L41 - L40) * (H40 > H41) + 6 / 7 * ((H41 - H42) * (H41 - H42 > L42 - L41) * (H41 > H42) + 6 / 7 * ((H42 - H43) * (H42 - H43 > L43 - L42) * (H42 > H43) + 6 / 7 * ((H43 - H44) * (H43 - H44 > L44 - L43) * (H43 > H44) + 6 / 7 * ((H44 - H45) * (H44 - H45 > L45 - L44) * (H44 > H45)))))))))))))))))))))))))))))))))))))))))))))) / (XAVGH13 - XAVGL13 + .142996048056393 * ((H < C1) * (H - C1) + (C1 < L) * (C1 - L) + 6 / 7 * ((H1 < C2) * (H1 - C2) + (C2 < L1) * (C2 - L1) + 6 / 7 * ((H2 < C3) * (H2 - C3) + (C3 < L2) * (C3 - L2) + 6 / 7 * ((H3 < C4) * (H3 - C4) + (C4 < L3) * (C4 - L3) + 6 / 7 * ((H4 < C5) * (H4 - C5) + (C5 < L4) * (C5 - L4) + 6 / 7 * ((H5 < C6) * (H5 - C6) + (C6 < L5) * (C6 - L5) + 6 / 7 * ((H6 < C7) * (H6 - C7) + (C7 < L6) * (C7 - L6) + 6 / 7 * ((H7 < C8) * (H7 - C8) + (C8 < L7) * (C8 - L7) + 6 / 7 * ((H8 < C9) * (H8 - C9) + (C9 < L8) * (C9 - L8) + 6 / 7 * ((H9 < C10) * (H9 - C10) + (C10 < L9) * (C10 - L9) + 6 / 7 * ((H10 < C11) * (H10 - C11) + (C11 < L10) * (C11 - L10) + 6 / 7 * ((H11 < C12) * (H11 - C12) + (C12 < L11) * (C12 - L11) + 6 / 7 * ((H12 < C13) * (H12 - C13) + (C13 < L12) * (C13 - L12) + 6 / 7 * ((H13 < C14) * (H13 - C14) + (C14 < L13) * (C14 - L13) + 6 / 7 * ((H14 < C15) * (H14 - C15) + (C15 < L14) * (C15 - L14) + 6 / 7 * ((H15 < C16) * (H15 - C16) + (C16 < L15) * (C16 - L15) + 6 / 7 * ((H16 < C17) * (H16 - C17) + (C17 < L16) * (C17 - L16) + 6 / 7 * ((H17 < C18) * (H17 - C18) + (C18 < L17) * (C18 - L17) + 6 / 7 * ((H18 < C19) * (H18 - C19) + (C19 < L18) * (C19 - L18) + 6 / 7 * ((H19 < C20) * (H19 - C20) + (C20 < L19) * (C20 - L19) + 6 / 7 * ((H20 < C21) * (H20 - C21) + (C21 < L20) * (C21 - L20) + 6 / 7 * ((H21 < C22) * (H21 - C22) + (C22 < L21) * (C22 - L21) + 6 / 7 * ((H22 < C23) * (H22 - C23) + (C23 < L22) * (C23 - L22) + 6 / 7 * ((H23 < C24) * (H23 - C24) + (C24 < L23) * (C24 - L23) + 6 / 7 * ((H24 < C25) * (H24 - C25) + (C25 < L24) * (C25 - L24) + 6 / 7 * ((H25 < C26) * (H25 - C26) + (C26 < L25) * (C26 - L25) + 6 / 7 * ((H26 < C27) * (H26 - C27) + (C27 < L26) * (C27 - L26) + 6 / 7 * ((H27 < C28) * (H27 - C28) + (C28 < L27) * (C28 - L27) + 6 / 7 * ((H28 < C29) * (H28 - C29) + (C29 < L28) * (C29 - L28) + 6 / 7 * ((H29 < C30) * (H29 - C30) + (C30 < L29) * (C30 - L29) + 6 / 7 * ((H30 < C31) * (H30 - C31) + (C31 < L30) * (C31 - L30) + 6 / 7 * ((H31 < C32) * (H31 - C32) + (C32 < L31) * (C32 - L31) + 6 / 7 * ((H32 < C33) * (H32 - C33) + (C33 < L32) * (C33 - L32) + 6 / 7 * ((H33 < C34) * (H33 - C34) + (C34 < L33) * (C34 - L33) + 6 / 7 * ((H34 < C35) * (H34 - C35) + (C35 < L34) * (C35 - L34) + 6 / 7 * ((H35 < C36) * (H35 - C36) + (C36 < L35) * (C36 - L35) + 6 / 7 * ((H36 < C37) * (H36 - C37) + (C37 < L36) * (C37 - L36) + 6 / 7 * ((H37 < C38) * (H37 - C38) + (C38 < L37) * (C38 - L37) + 6 / 7 * ((H38 < C39) * (H38 - C39) + (C39 < L38) * (C39 - L38) + 6 / 7 * ((H39 < C40) * (H39 - C40) + (C40 < L39) * (C40 - L39) + 6 / 7 * ((H40 < C41) * (H40 - C41) + (C41 < L40) * (C41 - L40) + 6 / 7 * ((H41 < C42) * (H41 - C42) + (C42 < L41) * (C42 - L41) + 6 / 7 * ((H42 < C43) * (H42 - C43) + (C43 < L42) * (C43 - L42) + 6 / 7 * ((H43 < C44) * (H43 - C44) + (C44 < L43) * (C44 - L43) + 6 / 7 * ((H44 < C45) * (H44 - C45) + (C45 < L44) * (C45 - L44)))))))))))))))))))))))))))))))))))))))))))))))

One way to write a 7-Period -DI would be:

14.2996048056393 * ((L1 - L) * (H - H1 < L1 - L) * (L < L1) + 6 / 7 * ((L2 - L1) * (H1 - H2 < L2 - L1) * (L1 < L2) + 6 / 7 * ((L3 - L2) * (H2 - H3 < L3 - L2) * (L2 < L3) + 6 / 7 * ((L4 - L3) * (H3 - H4 < L4 - L3) * (L3 < L4) + 6 / 7 * ((L5 - L4) * (H4 - H5 < L5 - L4) * (L4 < L5) + 6 / 7 * ((L6 - L5) * (H5 - H6 < L6 - L5) * (L5 < L6) + 6 / 7 * ((L7 - L6) * (H6 - H7 < L7 - L6) * (L6 < L7) + 6 / 7 * ((L8 - L7) * (H7 - H8 < L8 - L7) * (L7 < L8) + 6 / 7 * ((L9 - L8) * (H8 - H9 < L9 - L8) * (L8 < L9) + 6 / 7 * ((L10 - L9) * (H9 - H10 < L10 - L9) * (L9 < L10) + 6 / 7 * ((L11 - L10) * (H10 - H11 < L11 - L10) * (L10 < L11) + 6 / 7 * ((L12 - L11) * (H11 - H12 < L12 - L11) * (L11 < L12) + 6 / 7 * ((L13 - L12) * (H12 - H13 < L13 - L12) * (L12 < L13) + 6 / 7 * ((L14 - L13) * (H13 - H14 < L14 - L13) * (L13 < L14) + 6 / 7 * ((L15 - L14) * (H14 - H15 < L15 - L14) * (L14 < L15) + 6 / 7 * ((L16 - L15) * (H15 - H16 < L16 - L15) * (L15 < L16) + 6 / 7 * ((L17 - L16) * (H16 - H17 < L17 - L16) * (L16 < L17) + 6 / 7 * ((L18 - L17) * (H17 - H18 < L18 - L17) * (L17 < L18) + 6 / 7 * ((L19 - L18) * (H18 - H19 < L19 - L18) * (L18 < L19) + 6 / 7 * ((L20 - L19) * (H19 - H20 < L20 - L19) * (L19 < L20) + 6 / 7 * ((L21 - L20) * (H20 - H21 < L21 - L20) * (L20 < L21) + 6 / 7 * ((L22 - L21) * (H21 - H22 < L22 - L21) * (L21 < L22) + 6 / 7 * ((L23 - L22) * (H22 - H23 < L23 - L22) * (L22 < L23) + 6 / 7 * ((L24 - L23) * (H23 - H24 < L24 - L23) * (L23 < L24) + 6 / 7 * ((L25 - L24) * (H24 - H25 < L25 - L24) * (L24 < L25) + 6 / 7 * ((L26 - L25) * (H25 - H26 < L26 - L25) * (L25 < L26) + 6 / 7 * ((L27 - L26) * (H26 - H27 < L27 - L26) * (L26 < L27) + 6 / 7 * ((L28 - L27) * (H27 - H28 < L28 - L27) * (L27 < L28) + 6 / 7 * ((L29 - L28) * (H28 - H29 < L29 - L28) * (L28 < L29) + 6 / 7 * ((L30 - L29) * (H29 - H30 < L30 - L29) * (L29 < L30) + 6 / 7 * ((L31 - L30) * (H30 - H31 < L31 - L30) * (L30 < L31) + 6 / 7 * ((L32 - L31) * (H31 - H32 < L32 - L31) * (L31 < L32) + 6 / 7 * ((L33 - L32) * (H32 - H33 < L33 - L32) * (L32 < L33) + 6 / 7 * ((L34 - L33) * (H33 - H34 < L34 - L33) * (L33 < L34) + 6 / 7 * ((L35 - L34) * (H34 - H35 < L35 - L34) * (L34 < L35) + 6 / 7 * ((L36 - L35) * (H35 - H36 < L36 - L35) * (L35 < L36) + 6 / 7 * ((L37 - L36) * (H36 - H37 < L37 - L36) * (L36 < L37) + 6 / 7 * ((L38 - L37) * (H37 - H38 < L38 - L37) * (L37 < L38) + 6 / 7 * ((L39 - L38) * (H38 - H39 < L39 - L38) * (L38 < L39) + 6 / 7 * ((L40 - L39) * (H39 - H40 < L40 - L39) * (L39 < L40) + 6 / 7 * ((L41 - L40) * (H40 - H41 < L41 - L40) * (L40 < L41) + 6 / 7 * ((L42 - L41) * (H41 - H42 < L42 - L41) * (L41 < L42) + 6 / 7 * ((L43 - L42) * (H42 - H43 < L43 - L42) * (L42 < L43) + 6 / 7 * ((L44 - L43) * (H43 - H44 < L44 - L43) * (L43 < L44) + 6 / 7 * ((L45 - L44) * (H44 - H45 < L45 - L44) * (L44 < L45)))))))))))))))))))))))))))))))))))))))))))))) / (XAVGH13 - XAVGL13 + .142996048056393 * ((H < C1) * (H - C1) + (C1 < L) * (C1 - L) + 6 / 7 * ((H1 < C2) * (H1 - C2) + (C2 < L1) * (C2 - L1) + 6 / 7 * ((H2 < C3) * (H2 - C3) + (C3 < L2) * (C3 - L2) + 6 / 7 * ((H3 < C4) * (H3 - C4) + (C4 < L3) * (C4 - L3) + 6 / 7 * ((H4 < C5) * (H4 - C5) + (C5 < L4) * (C5 - L4) + 6 / 7 * ((H5 < C6) * (H5 - C6) + (C6 < L5) * (C6 - L5) + 6 / 7 * ((H6 < C7) * (H6 - C7) + (C7 < L6) * (C7 - L6) + 6 / 7 * ((H7 < C8) * (H7 - C8) + (C8 < L7) * (C8 - L7) + 6 / 7 * ((H8 < C9) * (H8 - C9) + (C9 < L8) * (C9 - L8) + 6 / 7 * ((H9 < C10) * (H9 - C10) + (C10 < L9) * (C10 - L9) + 6 / 7 * ((H10 < C11) * (H10 - C11) + (C11 < L10) * (C11 - L10) + 6 / 7 * ((H11 < C12) * (H11 - C12) + (C12 < L11) * (C12 - L11) + 6 / 7 * ((H12 < C13) * (H12 - C13) + (C13 < L12) * (C13 - L12) + 6 / 7 * ((H13 < C14) * (H13 - C14) + (C14 < L13) * (C14 - L13) + 6 / 7 * ((H14 < C15) * (H14 - C15) + (C15 < L14) * (C15 - L14) + 6 / 7 * ((H15 < C16) * (H15 - C16) + (C16 < L15) * (C16 - L15) + 6 / 7 * ((H16 < C17) * (H16 - C17) + (C17 < L16) * (C17 - L16) + 6 / 7 * ((H17 < C18) * (H17 - C18) + (C18 < L17) * (C18 - L17) + 6 / 7 * ((H18 < C19) * (H18 - C19) + (C19 < L18) * (C19 - L18) + 6 / 7 * ((H19 < C20) * (H19 - C20) + (C20 < L19) * (C20 - L19) + 6 / 7 * ((H20 < C21) * (H20 - C21) + (C21 < L20) * (C21 - L20) + 6 / 7 * ((H21 < C22) * (H21 - C22) + (C22 < L21) * (C22 - L21) + 6 / 7 * ((H22 < C23) * (H22 - C23) + (C23 < L22) * (C23 - L22) + 6 / 7 * ((H23 < C24) * (H23 - C24) + (C24 < L23) * (C24 - L23) + 6 / 7 * ((H24 < C25) * (H24 - C25) + (C25 < L24) * (C25 - L24) + 6 / 7 * ((H25 < C26) * (H25 - C26) + (C26 < L25) * (C26 - L25) + 6 / 7 * ((H26 < C27) * (H26 - C27) + (C27 < L26) * (C27 - L26) + 6 / 7 * ((H27 < C28) * (H27 - C28) + (C28 < L27) * (C28 - L27) + 6 / 7 * ((H28 < C29) * (H28 - C29) + (C29 < L28) * (C29 - L28) + 6 / 7 * ((H29 < C30) * (H29 - C30) + (C30 < L29) * (C30 - L29) + 6 / 7 * ((H30 < C31) * (H30 - C31) + (C31 < L30) * (C31 - L30) + 6 / 7 * ((H31 < C32) * (H31 - C32) + (C32 < L31) * (C32 - L31) + 6 / 7 * ((H32 < C33) * (H32 - C33) + (C33 < L32) * (C33 - L32) + 6 / 7 * ((H33 < C34) * (H33 - C34) + (C34 < L33) * (C34 - L33) + 6 / 7 * ((H34 < C35) * (H34 - C35) + (C35 < L34) * (C35 - L34) + 6 / 7 * ((H35 < C36) * (H35 - C36) + (C36 < L35) * (C36 - L35) + 6 / 7 * ((H36 < C37) * (H36 - C37) + (C37 < L36) * (C37 - L36) + 6 / 7 * ((H37 < C38) * (H37 - C38) + (C38 < L37) * (C38 - L37) + 6 / 7 * ((H38 < C39) * (H38 - C39) + (C39 < L38) * (C39 - L38) + 6 / 7 * ((H39 < C40) * (H39 - C40) + (C40 < L39) * (C40 - L39) + 6 / 7 * ((H40 < C41) * (H40 - C41) + (C41 < L40) * (C41 - L40) + 6 / 7 * ((H41 < C42) * (H41 - C42) + (C42 < L41) * (C42 - L41) + 6 / 7 * ((H42 < C43) * (H42 - C43) + (C43 < L42) * (C43 - L42) + 6 / 7 * ((H43 < C44) * (H43 - C44) + (C44 < L43) * (C44 - L43) + 6 / 7 * ((H44 < C45) * (H44 - C45) + (C45 < L44) * (C45 - L44)))))))))))))))))))))))))))))))))))))))))))))))

PCF for Wilder's Directional Movement DMI-crossovers
PCF for Wilder's DX, and/or a CI for Wilder's ADX
Sorting by the ADX indicator
Average Directional Index (ADX)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
pcox
Posted : Tuesday, August 31, 2010 5:41:42 PM
Gold Customer Gold Customer

Joined: 1/22/2010
Posts: 12
Many Thank You, my Friend.  Works like a charm...
Bruce_L
Posted : Tuesday, August 31, 2010 7:43:10 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.