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
Asked
Active
Viewed 1,765 times
2

Umesh Yennam
- 25
- 4
1 Answers
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