Just a naive question prompted by the vague english definitions of indicators ( Please use formulas and symbols for greater precision!):
Say the Close for bars t-2,t-1, and t are 5,3,and 2, respectively,
then at bar t is Lowest.Series(Close,2) 3 or 2 ? I.e. is Lowest.Series(Close,lb) at bar t = min(Close, bars t-lb to t-1) or is it min(Close, bars t-lb to t)?
Related to this question is why in many channel-breakout codes is it correct to shift the series forward by one bar with expressions such as
DataSeries s = Lowest.Series(Close, lb) >> 1 ?
Size:
Color:
Answer: 2
There are a couple reasons to shift (or delay):
1. On the chart, it's visually pleasing to see prices "crossing over/under" a plotted line.
2. CrossOver/Under is an easier test. Example:
CODE:
Please log in to see this code.
Size:
Color: