Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Need a formula for Directional Movement (+DI -DI), with a period of 6 Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jimmy8049
Posted : Friday, December 30, 2016 10:34:57 AM
Registered User
Joined: 1/21/2014
Posts: 15

please help

I need a formula for +DI6 and  a -DI6; I am no able to create the pcf  for them.

Bruce_L
Posted : Friday, December 30, 2016 10:51:07 AM


Worden Trainer

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

There will be much shorter ways to write this soon, but +DI6 can currently be written as follows.

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

And -DI6 can currently be written as follows.

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

PCF for Wilder's Directional Movement DMI-crossovers
PCF for Wilder's DX, and/or a CI for Wilder's ADX



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jimmy8049
Posted : Friday, December 30, 2016 12:24:31 PM
Registered User
Joined: 1/21/2014
Posts: 15

Thank you

Bruce_L
Posted : Friday, December 30, 2016 12:30:55 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.