Reply To: Rolling starting date of a line

Optuma Forums Optuma Scripting Rolling starting date of a line Reply To: Rolling starting date of a line

#66864
Matthew
  • Topics: 5
  • Replies: 521
  • Posts: 526

Hi,

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.

1 user thanked author for this post.

Pin It on Pinterest