Formulas:
ReverseMin[i] = Low[HL],
ReverseMax[i] = High[LH],
Min[i] = Low[LL],
Max[i] = High[HH], where
HL - index of highest Low price at range from (i-Reverse_Length+1) to (i-1),
LH - index of lowest High price at range from (i-Reverse_Length+1) to (i-1),
HH - index of highest High price at range from (i-Length+1) to (i-1),
LL - index of lowest Low price at range from (i-Length+1) to (i-1).
Download: