I am trying to make sense of the relative indexing example used in this "Charting Patterns on Price history" paper:
http://serv1.ist.psu.edu:8080/viewdoc/download;jsessionid=CC3DEF7277760C535FE3AB7C51A2BE90?doi=10.1.1.21.6892&rep=rep1&type=pdf
In Section 3 it defines:
type Indicator a = Bar → (Maybe a )
Indicator takes a bar b and returns an indicator value for
that bar. .....bar is associated with five basic fields:
high, low, open, close price, and transaction volume
......
It is very common while defining indicators to use past
values of an indicator. To support this, we have a combina-
tor (♯) which enables relative indexing into past data. Given
a bar (time), while an indicator, say high , evaluates to the
high price at the bar, high ♯ n yields the high price of n th
previous bar. (♯) is defined as follows:
(♯) :: Indicator a → Integer → Indicator a
ind ♯ n = λ b . ind (b − n )
I can't figure out how (b-n) translates to n'th previous bar. Any ideas?
daryoush