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

Need 5 PCFs, thanks! Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
PeterPan
Posted : Saturday, August 2, 2008 12:30:48 PM
Registered User
Joined: 2/4/2007
Posts: 10
Hi, someone help me creating 5 PCFs, thanks.

I want 10 days Average True Range, say ATR10. The 5 PCFs are:

ATR10
ATR10.1 (1 day ago)
ATR10.2 (2 days ago)
ATR10.3 (3 days ago)
ATR10.4 (4 days ago)

Michael_T
Posted : Monday, August 4, 2008 3:37:02 PM


Worden Trainer

Joined: 10/7/2004
Posts: 710
Check out the post here and see if it answers your question.
PeterPan
Posted : Monday, August 4, 2008 3:50:47 PM
Registered User
Joined: 2/4/2007
Posts: 10
Thanks.

I have ATR10. But I kind think that maybe you have program that can automatically generate ATR10.1, ATR10.2, ATR10.3, ATR10.4 for me. Too many numbers, very easy to go wrong. 

If no such kind of program, then fine, I can try to modify ATR10 to generate my own.
Michael_T
Posted : Monday, August 4, 2008 3:59:16 PM


Worden Trainer

Joined: 10/7/2004
Posts: 710
Sorry, but there is no program to do this. You'll have to create and enter them individually.

ATR is not recognized formula for a PCF...that's why I pointed you to the previous post.
Bruce_L
Posted : Thursday, August 7, 2008 11:15:54 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
PeterPan,
Assuming the ATR is Wilder's Smoothed, please try the following:

10-Period Wilder's Smoothed Average True Range:

XAVGH19 - XAVGL19 + .100095591785708 * ((H < C1) * (H - C1) + (C1 < L) * (C1 - L) + .9 * ((H1 < C2) * (H1 - C2) + (C2 < L1) * (C2 - L1) + .9 * ((H2 < C3) * (H2 - C3) + (C3 < L2) * (C3 - L2) + .9 * ((H3 < C4) * (H3 - C4) + (C4 < L3) * (C4 - L3) + .9 * ((H4 < C5) * (H4 - C5) + (C5 < L4) * (C5 - L4) + .9 * ((H5 < C6) * (H5 - C6) + (C6 < L5) * (C6 - L5) + .9 * ((H6 < C7) * (H6 - C7) + (C7 < L6) * (C7 - L6) + .9 * ((H7 < C8) * (H7 - C8) + (C8 < L7) * (C8 - L7) + .9 * ((H8 < C9) * (H8 - C9) + (C9 < L8) * (C9 - L8) + .9 * ((H9 < C10) * (H9 - C10) + (C10 < L9) * (C10 - L9) + .9 * ((H10 < C11) * (H10 - C11) + (C11 < L10) * (C11 - L10) + .9 * ((H11 < C12) * (H11 - C12) + (C12 < L11) * (C12 - L11) + .9 * ((H12 < C13) * (H12 - C13) + (C13 < L12) * (C13 - L12) + .9 * ((H13 < C14) * (H13 - C14) + (C14 < L13) * (C14 - L13) + .9 * ((H14 < C15) * (H14 - C15) + (C15 < L14) * (C15 - L14) + .9 * ((H15 < C16) * (H15 - C16) + (C16 < L15) * (C16 - L15) + .9 * ((H16 < C17) * (H16 - C17) + (C17 < L16) * (C17 - L16) + .9 * ((H17 < C18) * (H17 - C18) + (C18 < L17) * (C18 - L17) + .9 * ((H18 < C19) * (H18 - C19) + (C19 < L18) * (C19 - L18) + .9 * ((H19 < C20) * (H19 - C20) + (C20 < L19) * (C20 - L19) + .9 * ((H20 < C21) * (H20 - C21) + (C21 < L20) * (C21 - L20) + .9 * ((H21 < C22) * (H21 - C22) + (C22 < L21) * (C22 - L21) + .9 * ((H22 < C23) * (H22 - C23) + (C23 < L22) * (C23 - L22) + .9 * ((H23 < C24) * (H23 - C24) + (C24 < L23) * (C24 - L23) + .9 * ((H24 < C25) * (H24 - C25) + (C25 < L24) * (C25 - L24) + .9 * ((H25 < C26) * (H25 - C26) + (C26 < L25) * (C26 - L25) + .9 * ((H26 < C27) * (H26 - C27) + (C27 < L26) * (C27 - L26) + .9 * ((H27 < C28) * (H27 - C28) + (C28 < L27) * (C28 - L27) + .9 * ((H28 < C29) * (H28 - C29) + (C29 < L28) * (C29 - L28) + .9 * ((H29 < C30) * (H29 - C30) + (C30 < L29) * (C30 - L29) + .9 * ((H30 < C31) * (H30 - C31) + (C31 < L30) * (C31 - L30) + .9 * ((H31 < C32) * (H31 - C32) + (C32 < L31) * (C32 - L31) + .9 * ((H32 < C33) * (H32 - C33) + (C33 < L32) * (C33 - L32) + .9 * ((H33 < C34) * (H33 - C34) + (C34 < L33) * (C34 - L33) + .9 * ((H34 < C35) * (H34 - C35) + (C35 < L34) * (C35 - L34) + .9 * ((H35 < C36) * (H35 - C36) + (C36 < L35) * (C36 - L35) + .9 * ((H36 < C37) * (H36 - C37) + (C37 < L36) * (C37 - L36) + .9 * ((H37 < C38) * (H37 - C38) + (C38 < L37) * (C38 - L37) + .9 * ((H38 < C39) * (H38 - C39) + (C39 < L38) * (C39 - L38) + .9 * ((H39 < C40) * (H39 - C40) + (C40 < L39) * (C40 - L39) + .9 * ((H40 < C41) * (H40 - C41) + (C41 < L40) * (C41 - L40) + .9 * ((H41 < C42) * (H41 - C42) + (C42 < L41) * (C42 - L41) + .9 * ((H42 < C43) * (H42 - C43) + (C43 < L42) * (C43 - L42) + .9 * ((H43 < C44) * (H43 - C44) + (C44 < L43) * (C44 - L43) + .9 * ((H44 < C45) * (H44 - C45) + (C45 < L44) * (C45 - L44) + .9 * ((H45 < C46) * (H45 - C46) + (C46 < L45) * (C46 - L45) + .9 * ((H46 < C47) * (H46 - C47) + (C47 < L46) * (C47 - L46) + .9 * ((H47 < C48) * (H47 - C48) + (C48 < L47) * (C48 - L47) + .9 * ((H48 < C49) * (H48 - C49) + (C49 < L48) * (C49 - L48) + .9 * ((H49 < C50) * (H49 - C50) + (C50 < L49) * (C50 - L49) + .9 * ((H50 < C51) * (H50 - C51) + (C51 < L50) * (C51 - L50) + .9 * ((H51 < C52) * (H51 - C52) + (C52 < L51) * (C52 - L51) + .9 * ((H52 < C53) * (H52 - C53) + (C53 < L52) * (C53 - L52) + .9 * ((H53 < C54) * (H53 - C54) + (C54 < L53) * (C54 - L53) + .9 * ((H54 < C55) * (H54 - C55) + (C55 < L54) * (C55 - L54) + .9 * ((H55 < C56) * (H55 - C56) + (C56 < L55) * (C56 - L55) + .9 * ((H56 < C57) * (H56 - C57) + (C57 < L56) * (C57 - L56) + .9 * ((H57 < C58) * (H57 - C58) + (C58 < L57) * (C58 - L57) + .9 * ((H58 < C59) * (H58 - C59) + (C59 < L58) * (C59 - L58) + .9 * ((H59 < C60) * (H59 - C60) + (C60 < L59) * (C60 - L59) + .9 * ((H60 < C61) * (H60 - C61) + (C61 < L60) * (C61 - L60) + .9 * ((H61 < C62) * (H61 - C62) + (C62 < L61) * (C62 - L61) + .9 * ((H62 < C63) * (H62 - C63) + (C63 < L62) * (C63 - L62) + .9 * ((H63 < C64) * (H63 - C64) + (C64 < L63) * (C64 - L63) + .9 * ((H64 < C65) * (H64 - C65) + (C65 < L64) * (C65 - L64) + .9 * ((H65 < C66) * (H65 - C66) + (C66 < L65) * (C66 - L65)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

10-Period Wilder's Smoothed Average True Range (1-Period Ago):

XAVGH19.1 - XAVGL19.1 + .100095591785708 * ((H1 < C2) * (H1 - C2) + (C2 < L1) * (C2 - L1) + .9 * ((H2 < C3) * (H2 - C3) + (C3 < L2) * (C3 - L2) + .9 * ((H3 < C4) * (H3 - C4) + (C4 < L3) * (C4 - L3) + .9 * ((H4 < C5) * (H4 - C5) + (C5 < L4) * (C5 - L4) + .9 * ((H5 < C6) * (H5 - C6) + (C6 < L5) * (C6 - L5) + .9 * ((H6 < C7) * (H6 - C7) + (C7 < L6) * (C7 - L6) + .9 * ((H7 < C8) * (H7 - C8) + (C8 < L7) * (C8 - L7) + .9 * ((H8 < C9) * (H8 - C9) + (C9 < L8) * (C9 - L8) + .9 * ((H9 < C10) * (H9 - C10) + (C10 < L9) * (C10 - L9) + .9 * ((H10 < C11) * (H10 - C11) + (C11 < L10) * (C11 - L10) + .9 * ((H11 < C12) * (H11 - C12) + (C12 < L11) * (C12 - L11) + .9 * ((H12 < C13) * (H12 - C13) + (C13 < L12) * (C13 - L12) + .9 * ((H13 < C14) * (H13 - C14) + (C14 < L13) * (C14 - L13) + .9 * ((H14 < C15) * (H14 - C15) + (C15 < L14) * (C15 - L14) + .9 * ((H15 < C16) * (H15 - C16) + (C16 < L15) * (C16 - L15) + .9 * ((H16 < C17) * (H16 - C17) + (C17 < L16) * (C17 - L16) + .9 * ((H17 < C18) * (H17 - C18) + (C18 < L17) * (C18 - L17) + .9 * ((H18 < C19) * (H18 - C19) + (C19 < L18) * (C19 - L18) + .9 * ((H19 < C20) * (H19 - C20) + (C20 < L19) * (C20 - L19) + .9 * ((H20 < C21) * (H20 - C21) + (C21 < L20) * (C21 - L20) + .9 * ((H21 < C22) * (H21 - C22) + (C22 < L21) * (C22 - L21) + .9 * ((H22 < C23) * (H22 - C23) + (C23 < L22) * (C23 - L22) + .9 * ((H23 < C24) * (H23 - C24) + (C24 < L23) * (C24 - L23) + .9 * ((H24 < C25) * (H24 - C25) + (C25 < L24) * (C25 - L24) + .9 * ((H25 < C26) * (H25 - C26) + (C26 < L25) * (C26 - L25) + .9 * ((H26 < C27) * (H26 - C27) + (C27 < L26) * (C27 - L26) + .9 * ((H27 < C28) * (H27 - C28) + (C28 < L27) * (C28 - L27) + .9 * ((H28 < C29) * (H28 - C29) + (C29 < L28) * (C29 - L28) + .9 * ((H29 < C30) * (H29 - C30) + (C30 < L29) * (C30 - L29) + .9 * ((H30 < C31) * (H30 - C31) + (C31 < L30) * (C31 - L30) + .9 * ((H31 < C32) * (H31 - C32) + (C32 < L31) * (C32 - L31) + .9 * ((H32 < C33) * (H32 - C33) + (C33 < L32) * (C33 - L32) + .9 * ((H33 < C34) * (H33 - C34) + (C34 < L33) * (C34 - L33) + .9 * ((H34 < C35) * (H34 - C35) + (C35 < L34) * (C35 - L34) + .9 * ((H35 < C36) * (H35 - C36) + (C36 < L35) * (C36 - L35) + .9 * ((H36 < C37) * (H36 - C37) + (C37 < L36) * (C37 - L36) + .9 * ((H37 < C38) * (H37 - C38) + (C38 < L37) * (C38 - L37) + .9 * ((H38 < C39) * (H38 - C39) + (C39 < L38) * (C39 - L38) + .9 * ((H39 < C40) * (H39 - C40) + (C40 < L39) * (C40 - L39) + .9 * ((H40 < C41) * (H40 - C41) + (C41 < L40) * (C41 - L40) + .9 * ((H41 < C42) * (H41 - C42) + (C42 < L41) * (C42 - L41) + .9 * ((H42 < C43) * (H42 - C43) + (C43 < L42) * (C43 - L42) + .9 * ((H43 < C44) * (H43 - C44) + (C44 < L43) * (C44 - L43) + .9 * ((H44 < C45) * (H44 - C45) + (C45 < L44) * (C45 - L44) + .9 * ((H45 < C46) * (H45 - C46) + (C46 < L45) * (C46 - L45) + .9 * ((H46 < C47) * (H46 - C47) + (C47 < L46) * (C47 - L46) + .9 * ((H47 < C48) * (H47 - C48) + (C48 < L47) * (C48 - L47) + .9 * ((H48 < C49) * (H48 - C49) + (C49 < L48) * (C49 - L48) + .9 * ((H49 < C50) * (H49 - C50) + (C50 < L49) * (C50 - L49) + .9 * ((H50 < C51) * (H50 - C51) + (C51 < L50) * (C51 - L50) + .9 * ((H51 < C52) * (H51 - C52) + (C52 < L51) * (C52 - L51) + .9 * ((H52 < C53) * (H52 - C53) + (C53 < L52) * (C53 - L52) + .9 * ((H53 < C54) * (H53 - C54) + (C54 < L53) * (C54 - L53) + .9 * ((H54 < C55) * (H54 - C55) + (C55 < L54) * (C55 - L54) + .9 * ((H55 < C56) * (H55 - C56) + (C56 < L55) * (C56 - L55) + .9 * ((H56 < C57) * (H56 - C57) + (C57 < L56) * (C57 - L56) + .9 * ((H57 < C58) * (H57 - C58) + (C58 < L57) * (C58 - L57) + .9 * ((H58 < C59) * (H58 - C59) + (C59 < L58) * (C59 - L58) + .9 * ((H59 < C60) * (H59 - C60) + (C60 < L59) * (C60 - L59) + .9 * ((H60 < C61) * (H60 - C61) + (C61 < L60) * (C61 - L60) + .9 * ((H61 < C62) * (H61 - C62) + (C62 < L61) * (C62 - L61) + .9 * ((H62 < C63) * (H62 - C63) + (C63 < L62) * (C63 - L62) + .9 * ((H63 < C64) * (H63 - C64) + (C64 < L63) * (C64 - L63) + .9 * ((H64 < C65) * (H64 - C65) + (C65 < L64) * (C65 - L64) + .9 * ((H65 < C66) * (H65 - C66) + (C66 < L65) * (C66 - L65) + .9 * ((H66 < C67) * (H66 - C67) + (C67 < L66) * (C67 - L66)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

10-Period Wilder's Smoothed Average True Range (2-Periods Ago):

XAVGH19.2 - XAVGL19.2 + .100095591785708 * ((H2 < C3) * (H2 - C3) + (C3 < L2) * (C3 - L2) + .9 * ((H3 < C4) * (H3 - C4) + (C4 < L3) * (C4 - L3) + .9 * ((H4 < C5) * (H4 - C5) + (C5 < L4) * (C5 - L4) + .9 * ((H5 < C6) * (H5 - C6) + (C6 < L5) * (C6 - L5) + .9 * ((H6 < C7) * (H6 - C7) + (C7 < L6) * (C7 - L6) + .9 * ((H7 < C8) * (H7 - C8) + (C8 < L7) * (C8 - L7) + .9 * ((H8 < C9) * (H8 - C9) + (C9 < L8) * (C9 - L8) + .9 * ((H9 < C10) * (H9 - C10) + (C10 < L9) * (C10 - L9) + .9 * ((H10 < C11) * (H10 - C11) + (C11 < L10) * (C11 - L10) + .9 * ((H11 < C12) * (H11 - C12) + (C12 < L11) * (C12 - L11) + .9 * ((H12 < C13) * (H12 - C13) + (C13 < L12) * (C13 - L12) + .9 * ((H13 < C14) * (H13 - C14) + (C14 < L13) * (C14 - L13) + .9 * ((H14 < C15) * (H14 - C15) + (C15 < L14) * (C15 - L14) + .9 * ((H15 < C16) * (H15 - C16) + (C16 < L15) * (C16 - L15) + .9 * ((H16 < C17) * (H16 - C17) + (C17 < L16) * (C17 - L16) + .9 * ((H17 < C18) * (H17 - C18) + (C18 < L17) * (C18 - L17) + .9 * ((H18 < C19) * (H18 - C19) + (C19 < L18) * (C19 - L18) + .9 * ((H19 < C20) * (H19 - C20) + (C20 < L19) * (C20 - L19) + .9 * ((H20 < C21) * (H20 - C21) + (C21 < L20) * (C21 - L20) + .9 * ((H21 < C22) * (H21 - C22) + (C22 < L21) * (C22 - L21) + .9 * ((H22 < C23) * (H22 - C23) + (C23 < L22) * (C23 - L22) + .9 * ((H23 < C24) * (H23 - C24) + (C24 < L23) * (C24 - L23) + .9 * ((H24 < C25) * (H24 - C25) + (C25 < L24) * (C25 - L24) + .9 * ((H25 < C26) * (H25 - C26) + (C26 < L25) * (C26 - L25) + .9 * ((H26 < C27) * (H26 - C27) + (C27 < L26) * (C27 - L26) + .9 * ((H27 < C28) * (H27 - C28) + (C28 < L27) * (C28 - L27) + .9 * ((H28 < C29) * (H28 - C29) + (C29 < L28) * (C29 - L28) + .9 * ((H29 < C30) * (H29 - C30) + (C30 < L29) * (C30 - L29) + .9 * ((H30 < C31) * (H30 - C31) + (C31 < L30) * (C31 - L30) + .9 * ((H31 < C32) * (H31 - C32) + (C32 < L31) * (C32 - L31) + .9 * ((H32 < C33) * (H32 - C33) + (C33 < L32) * (C33 - L32) + .9 * ((H33 < C34) * (H33 - C34) + (C34 < L33) * (C34 - L33) + .9 * ((H34 < C35) * (H34 - C35) + (C35 < L34) * (C35 - L34) + .9 * ((H35 < C36) * (H35 - C36) + (C36 < L35) * (C36 - L35) + .9 * ((H36 < C37) * (H36 - C37) + (C37 < L36) * (C37 - L36) + .9 * ((H37 < C38) * (H37 - C38) + (C38 < L37) * (C38 - L37) + .9 * ((H38 < C39) * (H38 - C39) + (C39 < L38) * (C39 - L38) + .9 * ((H39 < C40) * (H39 - C40) + (C40 < L39) * (C40 - L39) + .9 * ((H40 < C41) * (H40 - C41) + (C41 < L40) * (C41 - L40) + .9 * ((H41 < C42) * (H41 - C42) + (C42 < L41) * (C42 - L41) + .9 * ((H42 < C43) * (H42 - C43) + (C43 < L42) * (C43 - L42) + .9 * ((H43 < C44) * (H43 - C44) + (C44 < L43) * (C44 - L43) + .9 * ((H44 < C45) * (H44 - C45) + (C45 < L44) * (C45 - L44) + .9 * ((H45 < C46) * (H45 - C46) + (C46 < L45) * (C46 - L45) + .9 * ((H46 < C47) * (H46 - C47) + (C47 < L46) * (C47 - L46) + .9 * ((H47 < C48) * (H47 - C48) + (C48 < L47) * (C48 - L47) + .9 * ((H48 < C49) * (H48 - C49) + (C49 < L48) * (C49 - L48) + .9 * ((H49 < C50) * (H49 - C50) + (C50 < L49) * (C50 - L49) + .9 * ((H50 < C51) * (H50 - C51) + (C51 < L50) * (C51 - L50) + .9 * ((H51 < C52) * (H51 - C52) + (C52 < L51) * (C52 - L51) + .9 * ((H52 < C53) * (H52 - C53) + (C53 < L52) * (C53 - L52) + .9 * ((H53 < C54) * (H53 - C54) + (C54 < L53) * (C54 - L53) + .9 * ((H54 < C55) * (H54 - C55) + (C55 < L54) * (C55 - L54) + .9 * ((H55 < C56) * (H55 - C56) + (C56 < L55) * (C56 - L55) + .9 * ((H56 < C57) * (H56 - C57) + (C57 < L56) * (C57 - L56) + .9 * ((H57 < C58) * (H57 - C58) + (C58 < L57) * (C58 - L57) + .9 * ((H58 < C59) * (H58 - C59) + (C59 < L58) * (C59 - L58) + .9 * ((H59 < C60) * (H59 - C60) + (C60 < L59) * (C60 - L59) + .9 * ((H60 < C61) * (H60 - C61) + (C61 < L60) * (C61 - L60) + .9 * ((H61 < C62) * (H61 - C62) + (C62 < L61) * (C62 - L61) + .9 * ((H62 < C63) * (H62 - C63) + (C63 < L62) * (C63 - L62) + .9 * ((H63 < C64) * (H63 - C64) + (C64 < L63) * (C64 - L63) + .9 * ((H64 < C65) * (H64 - C65) + (C65 < L64) * (C65 - L64) + .9 * ((H65 < C66) * (H65 - C66) + (C66 < L65) * (C66 - L65) + .9 * ((H66 < C67) * (H66 - C67) + (C67 < L66) * (C67 - L66) + .9 * ((H67 < C68) * (H67 - C68) + (C68 < L67) * (C68 - L67)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

10-Period Wilder's Smoothed Average True Range (3-Periods Ago):

XAVGH19.3 - XAVGL19.3 + .100095591785708 * ((H3 < C4) * (H3 - C4) + (C4 < L3) * (C4 - L3) + .9 * ((H4 < C5) * (H4 - C5) + (C5 < L4) * (C5 - L4) + .9 * ((H5 < C6) * (H5 - C6) + (C6 < L5) * (C6 - L5) + .9 * ((H6 < C7) * (H6 - C7) + (C7 < L6) * (C7 - L6) + .9 * ((H7 < C8) * (H7 - C8) + (C8 < L7) * (C8 - L7) + .9 * ((H8 < C9) * (H8 - C9) + (C9 < L8) * (C9 - L8) + .9 * ((H9 < C10) * (H9 - C10) + (C10 < L9) * (C10 - L9) + .9 * ((H10 < C11) * (H10 - C11) + (C11 < L10) * (C11 - L10) + .9 * ((H11 < C12) * (H11 - C12) + (C12 < L11) * (C12 - L11) + .9 * ((H12 < C13) * (H12 - C13) + (C13 < L12) * (C13 - L12) + .9 * ((H13 < C14) * (H13 - C14) + (C14 < L13) * (C14 - L13) + .9 * ((H14 < C15) * (H14 - C15) + (C15 < L14) * (C15 - L14) + .9 * ((H15 < C16) * (H15 - C16) + (C16 < L15) * (C16 - L15) + .9 * ((H16 < C17) * (H16 - C17) + (C17 < L16) * (C17 - L16) + .9 * ((H17 < C18) * (H17 - C18) + (C18 < L17) * (C18 - L17) + .9 * ((H18 < C19) * (H18 - C19) + (C19 < L18) * (C19 - L18) + .9 * ((H19 < C20) * (H19 - C20) + (C20 < L19) * (C20 - L19) + .9 * ((H20 < C21) * (H20 - C21) + (C21 < L20) * (C21 - L20) + .9 * ((H21 < C22) * (H21 - C22) + (C22 < L21) * (C22 - L21) + .9 * ((H22 < C23) * (H22 - C23) + (C23 < L22) * (C23 - L22) + .9 * ((H23 < C24) * (H23 - C24) + (C24 < L23) * (C24 - L23) + .9 * ((H24 < C25) * (H24 - C25) + (C25 < L24) * (C25 - L24) + .9 * ((H25 < C26) * (H25 - C26) + (C26 < L25) * (C26 - L25) + .9 * ((H26 < C27) * (H26 - C27) + (C27 < L26) * (C27 - L26) + .9 * ((H27 < C28) * (H27 - C28) + (C28 < L27) * (C28 - L27) + .9 * ((H28 < C29) * (H28 - C29) + (C29 < L28) * (C29 - L28) + .9 * ((H29 < C30) * (H29 - C30) + (C30 < L29) * (C30 - L29) + .9 * ((H30 < C31) * (H30 - C31) + (C31 < L30) * (C31 - L30) + .9 * ((H31 < C32) * (H31 - C32) + (C32 < L31) * (C32 - L31) + .9 * ((H32 < C33) * (H32 - C33) + (C33 < L32) * (C33 - L32) + .9 * ((H33 < C34) * (H33 - C34) + (C34 < L33) * (C34 - L33) + .9 * ((H34 < C35) * (H34 - C35) + (C35 < L34) * (C35 - L34) + .9 * ((H35 < C36) * (H35 - C36) + (C36 < L35) * (C36 - L35) + .9 * ((H36 < C37) * (H36 - C37) + (C37 < L36) * (C37 - L36) + .9 * ((H37 < C38) * (H37 - C38) + (C38 < L37) * (C38 - L37) + .9 * ((H38 < C39) * (H38 - C39) + (C39 < L38) * (C39 - L38) + .9 * ((H39 < C40) * (H39 - C40) + (C40 < L39) * (C40 - L39) + .9 * ((H40 < C41) * (H40 - C41) + (C41 < L40) * (C41 - L40) + .9 * ((H41 < C42) * (H41 - C42) + (C42 < L41) * (C42 - L41) + .9 * ((H42 < C43) * (H42 - C43) + (C43 < L42) * (C43 - L42) + .9 * ((H43 < C44) * (H43 - C44) + (C44 < L43) * (C44 - L43) + .9 * ((H44 < C45) * (H44 - C45) + (C45 < L44) * (C45 - L44) + .9 * ((H45 < C46) * (H45 - C46) + (C46 < L45) * (C46 - L45) + .9 * ((H46 < C47) * (H46 - C47) + (C47 < L46) * (C47 - L46) + .9 * ((H47 < C48) * (H47 - C48) + (C48 < L47) * (C48 - L47) + .9 * ((H48 < C49) * (H48 - C49) + (C49 < L48) * (C49 - L48) + .9 * ((H49 < C50) * (H49 - C50) + (C50 < L49) * (C50 - L49) + .9 * ((H50 < C51) * (H50 - C51) + (C51 < L50) * (C51 - L50) + .9 * ((H51 < C52) * (H51 - C52) + (C52 < L51) * (C52 - L51) + .9 * ((H52 < C53) * (H52 - C53) + (C53 < L52) * (C53 - L52) + .9 * ((H53 < C54) * (H53 - C54) + (C54 < L53) * (C54 - L53) + .9 * ((H54 < C55) * (H54 - C55) + (C55 < L54) * (C55 - L54) + .9 * ((H55 < C56) * (H55 - C56) + (C56 < L55) * (C56 - L55) + .9 * ((H56 < C57) * (H56 - C57) + (C57 < L56) * (C57 - L56) + .9 * ((H57 < C58) * (H57 - C58) + (C58 < L57) * (C58 - L57) + .9 * ((H58 < C59) * (H58 - C59) + (C59 < L58) * (C59 - L58) + .9 * ((H59 < C60) * (H59 - C60) + (C60 < L59) * (C60 - L59) + .9 * ((H60 < C61) * (H60 - C61) + (C61 < L60) * (C61 - L60) + .9 * ((H61 < C62) * (H61 - C62) + (C62 < L61) * (C62 - L61) + .9 * ((H62 < C63) * (H62 - C63) + (C63 < L62) * (C63 - L62) + .9 * ((H63 < C64) * (H63 - C64) + (C64 < L63) * (C64 - L63) + .9 * ((H64 < C65) * (H64 - C65) + (C65 < L64) * (C65 - L64) + .9 * ((H65 < C66) * (H65 - C66) + (C66 < L65) * (C66 - L65) + .9 * ((H66 < C67) * (H66 - C67) + (C67 < L66) * (C67 - L66) + .9 * ((H67 < C68) * (H67 - C68) + (C68 < L67) * (C68 - L67) + .9 * ((H68 < C69) * (H68 - C69) + (C69 < L68) * (C69 - L68)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

10-Period Wilder's Smoothed Average True Range (4-Periods Ago):

XAVGH19.4 - XAVGL19.4 + .100095591785708 * ((H4 < C5) * (H4 - C5) + (C5 < L4) * (C5 - L4) + .9 * ((H5 < C6) * (H5 - C6) + (C6 < L5) * (C6 - L5) + .9 * ((H6 < C7) * (H6 - C7) + (C7 < L6) * (C7 - L6) + .9 * ((H7 < C8) * (H7 - C8) + (C8 < L7) * (C8 - L7) + .9 * ((H8 < C9) * (H8 - C9) + (C9 < L8) * (C9 - L8) + .9 * ((H9 < C10) * (H9 - C10) + (C10 < L9) * (C10 - L9) + .9 * ((H10 < C11) * (H10 - C11) + (C11 < L10) * (C11 - L10) + .9 * ((H11 < C12) * (H11 - C12) + (C12 < L11) * (C12 - L11) + .9 * ((H12 < C13) * (H12 - C13) + (C13 < L12) * (C13 - L12) + .9 * ((H13 < C14) * (H13 - C14) + (C14 < L13) * (C14 - L13) + .9 * ((H14 < C15) * (H14 - C15) + (C15 < L14) * (C15 - L14) + .9 * ((H15 < C16) * (H15 - C16) + (C16 < L15) * (C16 - L15) + .9 * ((H16 < C17) * (H16 - C17) + (C17 < L16) * (C17 - L16) + .9 * ((H17 < C18) * (H17 - C18) + (C18 < L17) * (C18 - L17) + .9 * ((H18 < C19) * (H18 - C19) + (C19 < L18) * (C19 - L18) + .9 * ((H19 < C20) * (H19 - C20) + (C20 < L19) * (C20 - L19) + .9 * ((H20 < C21) * (H20 - C21) + (C21 < L20) * (C21 - L20) + .9 * ((H21 < C22) * (H21 - C22) + (C22 < L21) * (C22 - L21) + .9 * ((H22 < C23) * (H22 - C23) + (C23 < L22) * (C23 - L22) + .9 * ((H23 < C24) * (H23 - C24) + (C24 < L23) * (C24 - L23) + .9 * ((H24 < C25) * (H24 - C25) + (C25 < L24) * (C25 - L24) + .9 * ((H25 < C26) * (H25 - C26) + (C26 < L25) * (C26 - L25) + .9 * ((H26 < C27) * (H26 - C27) + (C27 < L26) * (C27 - L26) + .9 * ((H27 < C28) * (H27 - C28) + (C28 < L27) * (C28 - L27) + .9 * ((H28 < C29) * (H28 - C29) + (C29 < L28) * (C29 - L28) + .9 * ((H29 < C30) * (H29 - C30) + (C30 < L29) * (C30 - L29) + .9 * ((H30 < C31) * (H30 - C31) + (C31 < L30) * (C31 - L30) + .9 * ((H31 < C32) * (H31 - C32) + (C32 < L31) * (C32 - L31) + .9 * ((H32 < C33) * (H32 - C33) + (C33 < L32) * (C33 - L32) + .9 * ((H33 < C34) * (H33 - C34) + (C34 < L33) * (C34 - L33) + .9 * ((H34 < C35) * (H34 - C35) + (C35 < L34) * (C35 - L34) + .9 * ((H35 < C36) * (H35 - C36) + (C36 < L35) * (C36 - L35) + .9 * ((H36 < C37) * (H36 - C37) + (C37 < L36) * (C37 - L36) + .9 * ((H37 < C38) * (H37 - C38) + (C38 < L37) * (C38 - L37) + .9 * ((H38 < C39) * (H38 - C39) + (C39 < L38) * (C39 - L38) + .9 * ((H39 < C40) * (H39 - C40) + (C40 < L39) * (C40 - L39) + .9 * ((H40 < C41) * (H40 - C41) + (C41 < L40) * (C41 - L40) + .9 * ((H41 < C42) * (H41 - C42) + (C42 < L41) * (C42 - L41) + .9 * ((H42 < C43) * (H42 - C43) + (C43 < L42) * (C43 - L42) + .9 * ((H43 < C44) * (H43 - C44) + (C44 < L43) * (C44 - L43) + .9 * ((H44 < C45) * (H44 - C45) + (C45 < L44) * (C45 - L44) + .9 * ((H45 < C46) * (H45 - C46) + (C46 < L45) * (C46 - L45) + .9 * ((H46 < C47) * (H46 - C47) + (C47 < L46) * (C47 - L46) + .9 * ((H47 < C48) * (H47 - C48) + (C48 < L47) * (C48 - L47) + .9 * ((H48 < C49) * (H48 - C49) + (C49 < L48) * (C49 - L48) + .9 * ((H49 < C50) * (H49 - C50) + (C50 < L49) * (C50 - L49) + .9 * ((H50 < C51) * (H50 - C51) + (C51 < L50) * (C51 - L50) + .9 * ((H51 < C52) * (H51 - C52) + (C52 < L51) * (C52 - L51) + .9 * ((H52 < C53) * (H52 - C53) + (C53 < L52) * (C53 - L52) + .9 * ((H53 < C54) * (H53 - C54) + (C54 < L53) * (C54 - L53) + .9 * ((H54 < C55) * (H54 - C55) + (C55 < L54) * (C55 - L54) + .9 * ((H55 < C56) * (H55 - C56) + (C56 < L55) * (C56 - L55) + .9 * ((H56 < C57) * (H56 - C57) + (C57 < L56) * (C57 - L56) + .9 * ((H57 < C58) * (H57 - C58) + (C58 < L57) * (C58 - L57) + .9 * ((H58 < C59) * (H58 - C59) + (C59 < L58) * (C59 - L58) + .9 * ((H59 < C60) * (H59 - C60) + (C60 < L59) * (C60 - L59) + .9 * ((H60 < C61) * (H60 - C61) + (C61 < L60) * (C61 - L60) + .9 * ((H61 < C62) * (H61 - C62) + (C62 < L61) * (C62 - L61) + .9 * ((H62 < C63) * (H62 - C63) + (C63 < L62) * (C63 - L62) + .9 * ((H63 < C64) * (H63 - C64) + (C64 < L63) * (C64 - L63) + .9 * ((H64 < C65) * (H64 - C65) + (C65 < L64) * (C65 - L64) + .9 * ((H65 < C66) * (H65 - C66) + (C66 < L65) * (C66 - L65) + .9 * ((H66 < C67) * (H66 - C67) + (C67 < L66) * (C67 - L66) + .9 * ((H67 < C68) * (H67 - C68) + (C68 < L67) * (C68 - L67) + .9 * ((H68 < C69) * (H68 - C69) + (C69 < L68) * (C69 - L68) + .9 * ((H69 < C70) * (H69 - C70) + (C70 < L69) * (C70 - L69)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

You may wish to review the following:

How to create a Personal Criteria Forumula (PCF)
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
Cascades of Moving Averages

-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.