This is an overlay indicator that finds and identifies pivots. It is very sensitive so works best on smoother oscillators such as Stoch RSI. Make sure you set the source to your indicator after you overlay it. You will need to adjust the rev high and low inputs in the settings. For example Stoch RSI would have a revhigh = 80 and revlow = 20. This script is not designed to work on the chart.
Yellow = First Higher low or First Lower High
Orange = Reversal (Indicator low and high levels can be adjusted in settings.
Teal = Higher Low
Red = Lower High
Gray = Higher high or Lower Low