- Topics: 5
- Replies: 521
- Posts: 526
Your example used a quarterly chart, so I did the same. BarIndex() was used to determine how far back the line should go, in your example you were starting from the bar you took the H/L average from, which was the second last bar, so I used the offset to set that.
BarIndex() > Last(BarIndex(OFFSET=2))
All bars on a chart have a bar index, you can add BARINDEX() to a Show View to see each value. This can be used as a reference to change the range in different scripts.