How can I calculate and display a single highest high and lowest low within a predefined interval in Pine Script?
I am trying to calculate and display a single highest high and lowest low within predefined intervals (e.g., every 20 candles) in Pine Script v6. The goal is to integrate this logic into a Supertrend indicator to accurately identify the highest and lowest points of each trend.