That is exactly how I would do it. Since it is easier to shorten the formula then lengthen it, here it is out to 100 bars.
IIF(H = MAXH63, ATR22, IIF(H1 = MAXH63.1, ATR22.1, IIF(H2 = MAXH63.2, ATR22.2, IIF(H3 = MAXH63.3, ATR22.3, IIF(H4 = MAXH63.4, ATR22.4, IIF(H5 = MAXH63.5, ATR22.5, IIF(H6 = MAXH63.6, ATR22.6, IIF(H7 = MAXH63.7, ATR22.7, IIF(H8 = MAXH63.8, ATR22.8, IIF(H9 = MAXH63.9, ATR22.9, IIF(H10 = MAXH63.10, ATR22.10, IIF(H11 = MAXH63.11, ATR22.11, IIF(H12 = MAXH63.12, ATR22.12, IIF(H13 = MAXH63.13, ATR22.13, IIF(H14 = MAXH63.14, ATR22.14, IIF(H15 = MAXH63.15, ATR22.15, IIF(H16 = MAXH63.16, ATR22.16, IIF(H17 = MAXH63.17, ATR22.17, IIF(H18 = MAXH63.18, ATR22.18, IIF(H19 = MAXH63.19, ATR22.19, IIF(H20 = MAXH63.20, ATR22.20, IIF(H21 = MAXH63.21, ATR22.21, IIF(H22 = MAXH63.22, ATR22.22, IIF(H23 = MAXH63.23, ATR22.23, IIF(H24 = MAXH63.24, ATR22.24, IIF(H25 = MAXH63.25, ATR22.25, IIF(H26 = MAXH63.26, ATR22.26, IIF(H27 = MAXH63.27, ATR22.27, IIF(H28 = MAXH63.28, ATR22.28, IIF(H29 = MAXH63.29, ATR22.29, IIF(H30 = MAXH63.30, ATR22.30, IIF(H31 = MAXH63.31, ATR22.31, IIF(H32 = MAXH63.32, ATR22.32, IIF(H33 = MAXH63.33, ATR22.33, IIF(H34 = MAXH63.34, ATR22.34, IIF(H35 = MAXH63.35, ATR22.35, IIF(H36 = MAXH63.36, ATR22.36, IIF(H37 = MAXH63.37, ATR22.37, IIF(H38 = MAXH63.38, ATR22.38, IIF(H39 = MAXH63.39, ATR22.39, IIF(H40 = MAXH63.40, ATR22.40, IIF(H41 = MAXH63.41, ATR22.41, IIF(H42 = MAXH63.42, ATR22.42, IIF(H43 = MAXH63.43, ATR22.43, IIF(H44 = MAXH63.44, ATR22.44, IIF(H45 = MAXH63.45, ATR22.45, IIF(H46 = MAXH63.46, ATR22.46, IIF(H47 = MAXH63.47, ATR22.47, IIF(H48 = MAXH63.48, ATR22.48, IIF(H49 = MAXH63.49, ATR22.49, IIF(H50 = MAXH63.50, ATR22.50, IIF(H51 = MAXH63.51, ATR22.51, IIF(H52 = MAXH63.52, ATR22.52, IIF(H53 = MAXH63.53, ATR22.53, IIF(H54 = MAXH63.54, ATR22.54, IIF(H55 = MAXH63.55, ATR22.55, IIF(H56 = MAXH63.56, ATR22.56, IIF(H57 = MAXH63.57, ATR22.57, IIF(H58 = MAXH63.58, ATR22.58, IIF(H59 = MAXH63.59, ATR22.59, IIF(H60 = MAXH63.60, ATR22.60, IIF(H61 = MAXH63.61, ATR22.61, IIF(H62 = MAXH63.62, ATR22.62, IIF(H63 = MAXH63.63, ATR22.63, IIF(H64 = MAXH63.64, ATR22.64, IIF(H65 = MAXH63.65, ATR22.65, IIF(H66 = MAXH63.66, ATR22.66, IIF(H67 = MAXH63.67, ATR22.67, IIF(H68 = MAXH63.68, ATR22.68, IIF(H69 = MAXH63.69, ATR22.69, IIF(H70 = MAXH63.70, ATR22.70, IIF(H71 = MAXH63.71, ATR22.71, IIF(H72 = MAXH63.72, ATR22.72, IIF(H73 = MAXH63.73, ATR22.73, IIF(H74 = MAXH63.74, ATR22.74, IIF(H75 = MAXH63.75, ATR22.75, IIF(H76 = MAXH63.76, ATR22.76, IIF(H77 = MAXH63.77, ATR22.77, IIF(H78 = MAXH63.78, ATR22.78, IIF(H79 = MAXH63.79, ATR22.79, IIF(H80 = MAXH63.80, ATR22.80, IIF(H81 = MAXH63.81, ATR22.81, IIF(H82 = MAXH63.82, ATR22.82, IIF(H83 = MAXH63.83, ATR22.83, IIF(H84 = MAXH63.84, ATR22.84, IIF(H85 = MAXH63.85, ATR22.85, IIF(H86 = MAXH63.86, ATR22.86, IIF(H87 = MAXH63.87, ATR22.87, IIF(H88 = MAXH63.88, ATR22.88, IIF(H89 = MAXH63.89, ATR22.89, IIF(H90 = MAXH63.90, ATR22.90, IIF(H91 = MAXH63.91, ATR22.91, IIF(H92 = MAXH63.92, ATR22.92, IIF(H93 = MAXH63.93, ATR22.93, IIF(H94 = MAXH63.94, ATR22.94, IIF(H95 = MAXH63.95, ATR22.95, IIF(H96 = MAXH63.96, ATR22.96, IIF(H97 = MAXH63.97, ATR22.97, IIF(H98 = MAXH63.98, ATR22.98, IIF(H99 = MAXH63.99, ATR22.99, 1 / 0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Bruce
Personal Criteria Formulas TC2000 Support Articles
