2

I'm new to Pine script, please, anyone explain me exactly what this high[abs(highestbars(amplitude))] statement returns, specially in highestbars(2) definition what it mean Highest value offset?? FYI this statement is from Tradingview.com HalfTrend script, thanks

1 Answers1

2

highestbars() will give you the bar index offset of the highest bar in the given range.

For example, if highestbars(5) returns -2, you know that the highest bar within the last 5 bars was 2 bars ago.

vitruvius
  • 15,740
  • 3
  • 16
  • 26