Previous Pivots
The Previous Pivots function propagates an arbitrary number of previous pivots to the future. The purpose of this function is to enable the users to utilize the price of the previous pivots in analysis. The inputs of this function are:
Timeframes: The timeframe(s) in which the function is applied
Loock Back Window Length: The number of candles the function considers in the past to find local minima and maxima
Horizon: The number of previous high and low pivots propagated to the future
Confirmation Lag: The number of candles the function waits to confirm a local maximum or minimum; note that as this parameter becomes larger, the lag of the system also increases, but pivots become more reliable.
High Pivots Source: The source used for finding high pivots
Low Pivots Source: The source used for finding low pivots
Sort Results: When turned on, the price of pivots will be sorted with pivot_high_1 and pivot_low_1 always containing the smallest high and low pivot values.
Example
Using the Previous Pivots function with the following configurations, we obtain the last four pivots ( four high and four low pivots).

As is seen, for each candle, eight values corresponding for four high and four low pivots are returned.
