Or it may be a more complicated fold such as: fold i = 0 to 100 with price = Double.NaN while !IsNaN(price) do if getValue(high, -i) > 40 then getValue(high, -i) else Double.NaN; This finds the next high price value greater than 40 among the following 100 bars and terminates looping if price is no longer a number. If the index was to be 1 thru 10, the current value of price would not be included in the average because the first value would be price[1]. addlabel(yes,"Vol as % of " + VolAvgLength + " agg-bar avg volume = " + aspercent(Round(data,2)),if data < 0 then color.RED else color.GREEN); #hint: Plots: 1. TD Ameritrade, Inc., memberFINRA/SIPC, a subsidiary of The Charles Schwab Corporation. A swing low is the lowest low looking a few bars back and a few bars forward. CustomColor color' defines the background color of the label box. PolarizedFractalEfficiency_SFL . However, there are keyboard hotkeys that facilitate editing activities. The defaults parameters are price = close, length1 = 15, length2 = 30. def crossingover = close("Greatest Show Ever! The choices include other than price items such as volume and 'imp volatility'. plot MA50 = MovAvg50; Defines the algorithm to calculate the distance at which the lines are plotted: Standard deviation(standard deviation of price), Standard error(standard deviation between price and regression line), Equidistributed deviation (average deviation between price and regression line), Raff channels (maximum deviation between price and regression line), Raff channels high/low (maximum deviation between high/low and regression line) , or Segment high/low (deviation between maximum high/minimum low and regression line). the liberty to include TOS-platform-features that are not only script snippets but def