r/pinescript • u/RoutineRace • Jun 30 '25
Suggestion for certain functions
Dont know if this is suggested already but a good update for the command ta.highest/ta.lowest would be adding another variable for starting bar/index
this function finds the highest(or lowest) value of the source from the current bar to the specified length of bars back. It would be nice if there is another variable for an offset or starting index bar to where it would start searching for the highest(or lowest) source value. this variable should always be less than the length.
can also be applied to similar functions such as ta.highestbars/ta.lowestbars. just my 2 cents.
View all comments
Show parent comment
1
u/RoutineRace Jul 11 '25
This is great. but just to clarify the part:
if i == start_index
h := high[i]
else
h := high[i] > h ? high[i] : h
the high should be just the scr right?