The indicator marks swing highs and swing lows with dots and plots a simple moving average of the close. A bar is a swing high when its high is strictly above the highs of ZZDepth bars on each side of it, and a swing low when its low is strictly below the lows of ZZDepth bars on each side. If a bar meets both conditions, it is marked as a swing high.
A pivot needs ZZDepth bars on its right side, so the dot appears ZZDepth bars after the extreme and is placed back on the pivot bar itself. The newest of these bars is the one still forming, so the most recent dot is final only after that bar has closed. After that the dot is not moved or removed. The method is a symmetric window test and not the standard ZigZag algorithm, so there is no deviation or backstep parameter.
The moving average is a simple MA of close prices with the period MA_Period. It gives the direction of the larger move, and the pivots show the most recent confirmed highs and lows around it. A larger ZZDepth leaves fewer, more significant pivots and delays their confirmation; a smaller value marks more pivots and confirms them sooner.
Input parameters
Buffers: 0 - moving average, 1 - pivot price (0 where there is no pivot). The indicator does not place or manage trades.

Confirmed swing pivots and trend moving average on EURUSD H1
Donchian Breakout Channel with ATR Trailing Stop
Plots a Donchian channel built from closed bars, arrows after a close outside the channel and a two-colour ATR trailing stop line that follows the breakout direction.
Previous Day and Week Levels with Round Numbers
Draws the high and low of the previous day and the previous week plus round-number levels around the current price as horizontal lines.
Bollinger Keltner Squeeze Release Arrows
Shows Bollinger bands and a Keltner channel on the chart, marks bars where the bands are inside the channel and draws an arrow when that squeeze ends.
RSI Pullback Zones Above Rising SMA
Plots a long-period SMA and marks bars where the RSI has pulled back to a set level while the price is still above the rising SMA.