TC2000.com• Download software • Tutorial videos • Subscription & data-feed pricing • Class schedule
TC2000Brokerage.com• New account application • Trading resources • Margin rates • Stock & option commissions
Worden Discussion Forum » Customer Training & Support » Ask a Trainer - TC2000 version 12/18 » Formula for the High at the most recent Swing High
Bruce, Below is a formula you offered for determining the low at the most recent swing low.
I am wondering if you have a similar formula for determing the opposite, the high at the most recent swing high?
ABS(IIF(MINL2 > L2 AND L2 < MINL2.3, L2, IIF(MINL2.1 > L3 AND L3 < MINL2.4, L3, IIF(MINL2.2 > L4 AND L4 < MINL2.5, L4, IIF(MINL2.3 > L5 AND L5 < MINL2.6, L5, IIF(MINL2.4 > L6 AND L6 < MINL2.7, L6, IIF(MINL2.5 > L7 AND L7 < MINL2.8, L7, IIF(MINL2.6 > L8 AND L8 < MINL2.9, L8, IIF(MINL2.7 > L9 AND L9 < MINL2.10, L9, IIF(MINL2.8 > L10 AND L10 < MINL2.11, L10, IIF(MINL2.9 > L11 AND L11 < MINL2.12, L11, IIF(MINL2.10 > L12 AND L12 < MINL2.13, L12, IIF(MINL2.11 > L13 AND L13 < MINL2.14, L13, IIF(MINL2.12 > L14 AND L14 < MINL2.15, L14, IIF(MINL2.13 > L15 AND L15 < MINL2.16, L15, IIF(MINL2.14 > L16 AND L16 < MINL2.17, L16, IIF(MINL2.15 > L17 AND L17 < MINL2.18, L17, IIF(MINL2.16 > L18 AND L18 < MINL2.19, L18, IIF(MINL2.17 > L19 AND L19 < MINL2.20, L19, IIF(MINL2.18 > L20 AND L20 < MINL2.21, L20, IIF(MINL2.19 > L21 AND L21 < MINL2.22, L21, IIF(MINL2.20 > L22 AND L22 < MINL2.23, L22, IIF(MINL2.21 > L23 AND L23 < MINL2.24, L23, IIF(MINL2.22 > L24 AND L24 < MINL2.25, L24, IIF(MINL2.23 > L25 AND L25 < MINL2.26, L25, IIF(MINL2.24 > L26 AND L26 < MINL2.27, L26, IIF(MINL2.25 > L27 AND L27 < MINL2.28, L27, IIF(MINL2.26 > L28 AND L28 < MINL2.29, L28, IIF(MINL2.27 > L29 AND L29 < MINL2.30, L29, IIF(MINL2.28 > L30 AND L30 < MINL2.31, L30, IIF(MINL2.29 > L31 AND L31 < MINL2.32, L31, IIF(MINL2.30 > L32 AND L32 < MINL2.33, L32, IIF(MINL2.31 > L33 AND L33 < MINL2.34, L33, IIF(MINL2.32 > L34 AND L34 < MINL2.35, L34, IIF(MINL2.33 > L35 AND L35 < MINL2.36, L35, IIF(MINL2.34 > L36 AND L36 < MINL2.37, L36, IIF(MINL2.35 > L37 AND L37 < MINL2.38, L37, IIF(MINL2.36 > L38 AND L38 < MINL2.39, L38, IIF(MINL2.37 > L39 AND L39 < MINL2.40, L39, IIF(MINL2.38 > L40 AND L40 < MINL2.41, L40, IIF(MINL2.39 > L41 AND L41 < MINL2.42, L41, IIF(MINL2.40 > L42 AND L42 < MINL2.43, L42, IIF(MINL2.41 > L43 AND L43 < MINL2.44, L43, IIF(MINL2.42 > L44 AND L44 < MINL2.45, L44, IIF(MINL2.43 > L45 AND L45 < MINL2.46, L45, IIF(MINL2.44 > L46 AND L46 < MINL2.47, L46, IIF(MINL2.45 > L47 AND L47 < MINL2.48, L47, IIF(MINL2.46 > L48 AND L48 < MINL2.49, L48, IIF(MINL2.47 > L49 AND L49 < MINL2.50, L49, IIF(MINL2.48 > L50 AND L50 < MINL2.51, L50, IIF(MINL2.49 > L51 AND L51 < MINL2.52, L51, 0 / 1)))))))))))))))))))))))))))))))))))))))))))))))))) - (L + C) / 2) < (C - L) / 2
Reversing just the part of that formula which returns the value of the most recent swing low results in the following.
IIF(MAXH2 < H2 AND H2 > MAXH2.3, H2, IIF(MAXH2.1 < H3 AND H3 > MAXH2.4, H3, IIF(MAXH2.2 < H4 AND H4 > MAXH2.5, H4, IIF(MAXH2.3 < H5 AND H5 > MAXH2.6, H5, IIF(MAXH2.4 < H6 AND H6 > MAXH2.7, H6, IIF(MAXH2.5 < H7 AND H7 > MAXH2.8, H7, IIF(MAXH2.6 < H8 AND H8 > MAXH2.9, H8, IIF(MAXH2.7 < H9 AND H9 > MAXH2.10, H9, IIF(MAXH2.8 < H10 AND H10 > MAXH2.11, H10, IIF(MAXH2.9 < H11 AND H11 > MAXH2.12, H11, IIF(MAXH2.10 < H12 AND H12 > MAXH2.13, H12, IIF(MAXH2.11 < H13 AND H13 > MAXH2.14, H13, IIF(MAXH2.12 < H14 AND H14 > MAXH2.15, H14, IIF(MAXH2.13 < H15 AND H15 > MAXH2.16, H15, IIF(MAXH2.14 < H16 AND H16 > MAXH2.17, H16, IIF(MAXH2.15 < H17 AND H17 > MAXH2.18, H17, IIF(MAXH2.16 < H18 AND H18 > MAXH2.19, H18, IIF(MAXH2.17 < H19 AND H19 > MAXH2.20, H19, IIF(MAXH2.18 < H20 AND H20 > MAXH2.21, H20, IIF(MAXH2.19 < H21 AND H21 > MAXH2.22, H21, IIF(MAXH2.20 < H22 AND H22 > MAXH2.23, H22, IIF(MAXH2.21 < H23 AND H23 > MAXH2.24, H23, IIF(MAXH2.22 < H24 AND H24 > MAXH2.25, H24, IIF(MAXH2.23 < H25 AND H25 > MAXH2.26, H25, IIF(MAXH2.24 < H26 AND H26 > MAXH2.27, H26, IIF(MAXH2.25 < H27 AND H27 > MAXH2.28, H27, IIF(MAXH2.26 < H28 AND H28 > MAXH2.29, H28, IIF(MAXH2.27 < H29 AND H29 > MAXH2.30, H29, IIF(MAXH2.28 < H30 AND H30 > MAXH2.31, H30, IIF(MAXH2.29 < H31 AND H31 > MAXH2.32, H31, IIF(MAXH2.30 < H32 AND H32 > MAXH2.33, H32, IIF(MAXH2.31 < H33 AND H33 > MAXH2.34, H33, IIF(MAXH2.32 < H34 AND H34 > MAXH2.35, H34, IIF(MAXH2.33 < H35 AND H35 > MAXH2.36, H35, IIF(MAXH2.34 < H36 AND H36 > MAXH2.37, H36, IIF(MAXH2.35 < H37 AND H37 > MAXH2.38, H37, IIF(MAXH2.36 < H38 AND H38 > MAXH2.39, H38, IIF(MAXH2.37 < H39 AND H39 > MAXH2.40, H39, IIF(MAXH2.38 < H40 AND H40 > MAXH2.41, H40, IIF(MAXH2.39 < H41 AND H41 > MAXH2.42, H41, IIF(MAXH2.40 < H42 AND H42 > MAXH2.43, H42, IIF(MAXH2.41 < H43 AND H43 > MAXH2.44, H43, IIF(MAXH2.42 < H44 AND H44 > MAXH2.45, H44, IIF(MAXH2.43 < H45 AND H45 > MAXH2.46, H45, IIF(MAXH2.44 < H46 AND H46 > MAXH2.47, H46, IIF(MAXH2.45 < H47 AND H47 > MAXH2.48, H47, IIF(MAXH2.46 < H48 AND H48 > MAXH2.49, H48, IIF(MAXH2.47 < H49 AND H49 > MAXH2.50, H49, IIF(MAXH2.48 < H50 AND H50 > MAXH2.51, H50, IIF(MAXH2.49 < H51 AND H51 > MAXH2.52, H51, 0 / 1))))))))))))))))))))))))))))))))))))))))))))))))))
Sorry, Bruce, I was able to get the first one (swing Low) to plot successfully, but not the second. I tried it with and without - (L + C) / 2) < (C - L) / 2 appended, but neither worked. I'm sure there are more variations I could try, but I lost patience.Could you step me thru it?
Thanks
As a formula, it definitely plots the value of the most recent swing high as a Custom PCF Indicator if you don't add anything to it.
Your other formula would work in a Custom PCF % True Indicator and returns a true or false result instead of returning the value of the swing low. It returns true when the value of the most recent swing low is less than the close of the current bar but above the low of the current bar.
Custom PCF Indicators and Custom PCF % True Indicators are two different things, so make sure you are using the correct one.
If you want a formula which returns true when the value of the most recent swing high is less than the high of the current bar but above the close of the current bar, it could be written as follows and used as a Custom PCF % True Indicator (but note that it definitely does not return the value of the swing high like the other formula).
ABS(IIF(MAXH2 < H2 AND H2 > MAXH2.3, H2, IIF(MAXH2.1 < H3 AND H3 > MAXH2.4, H3, IIF(MAXH2.2 < H4 AND H4 > MAXH2.5, H4, IIF(MAXH2.3 < H5 AND H5 > MAXH2.6, H5, IIF(MAXH2.4 < H6 AND H6 > MAXH2.7, H6, IIF(MAXH2.5 < H7 AND H7 > MAXH2.8, H7, IIF(MAXH2.6 < H8 AND H8 > MAXH2.9, H8, IIF(MAXH2.7 < H9 AND H9 > MAXH2.10, H9, IIF(MAXH2.8 < H10 AND H10 > MAXH2.11, H10, IIF(MAXH2.9 < H11 AND H11 > MAXH2.12, H11, IIF(MAXH2.10 < H12 AND H12 > MAXH2.13, H12, IIF(MAXH2.11 < H13 AND H13 > MAXH2.14, H13, IIF(MAXH2.12 < H14 AND H14 > MAXH2.15, H14, IIF(MAXH2.13 < H15 AND H15 > MAXH2.16, H15, IIF(MAXH2.14 < H16 AND H16 > MAXH2.17, H16, IIF(MAXH2.15 < H17 AND H17 > MAXH2.18, H17, IIF(MAXH2.16 < H18 AND H18 > MAXH2.19, H18, IIF(MAXH2.17 < H19 AND H19 > MAXH2.20, H19, IIF(MAXH2.18 < H20 AND H20 > MAXH2.21, H20, IIF(MAXH2.19 < H21 AND H21 > MAXH2.22, H21, IIF(MAXH2.20 < H22 AND H22 > MAXH2.23, H22, IIF(MAXH2.21 < H23 AND H23 > MAXH2.24, H23, IIF(MAXH2.22 < H24 AND H24 > MAXH2.25, H24, IIF(MAXH2.23 < H25 AND H25 > MAXH2.26, H25, IIF(MAXH2.24 < H26 AND H26 > MAXH2.27, H26, IIF(MAXH2.25 < H27 AND H27 > MAXH2.28, H27, IIF(MAXH2.26 < H28 AND H28 > MAXH2.29, H28, IIF(MAXH2.27 < H29 AND H29 > MAXH2.30, H29, IIF(MAXH2.28 < H30 AND H30 > MAXH2.31, H30, IIF(MAXH2.29 < H31 AND H31 > MAXH2.32, H31, IIF(MAXH2.30 < H32 AND H32 > MAXH2.33, H32, IIF(MAXH2.31 < H33 AND H33 > MAXH2.34, H33, IIF(MAXH2.32 < H34 AND H34 > MAXH2.35, H34, IIF(MAXH2.33 < H35 AND H35 > MAXH2.36, H35, IIF(MAXH2.34 < H36 AND H36 > MAXH2.37, H36, IIF(MAXH2.35 < H37 AND H37 > MAXH2.38, H37, IIF(MAXH2.36 < H38 AND H38 > MAXH2.39, H38, IIF(MAXH2.37 < H39 AND H39 > MAXH2.40, H39, IIF(MAXH2.38 < H40 AND H40 > MAXH2.41, H40, IIF(MAXH2.39 < H41 AND H41 > MAXH2.42, H41, IIF(MAXH2.40 < H42 AND H42 > MAXH2.43, H42, IIF(MAXH2.41 < H43 AND H43 > MAXH2.44, H43, IIF(MAXH2.42 < H44 AND H44 > MAXH2.45, H44, IIF(MAXH2.43 < H45 AND H45 > MAXH2.46, H45, IIF(MAXH2.44 < H46 AND H46 > MAXH2.47, H46, IIF(MAXH2.45 < H47 AND H47 > MAXH2.48, H47, IIF(MAXH2.46 < H48 AND H48 > MAXH2.49, H48, IIF(MAXH2.47 < H49 AND H49 > MAXH2.50, H49, IIF(MAXH2.48 < H50 AND H50 > MAXH2.51, H50, IIF(MAXH2.49 < H51 AND H51 > MAXH2.52, H51, 0 / 1)))))))))))))))))))))))))))))))))))))))))))))))))) - (H + C) / 2) < (H - C) / 2