Definition of Lowest and Highest
Author: paul3nt
Creation Date: 8/17/2010 12:40 PM
profile picture



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 ?
profile picture


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:

Please log in to see this code.

This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).