OPEN-SOURCE SCRIPT
Compact Swing Leg Tracker (Strict, Static PB, Compact Table)

Simple Swing Leg Tracker is the evolution of the original Simple Swing indicator — rebuilt for smoother leg tracking, cleaner visuals, and added context. It automatically identifies up and down legs in real time, plotting an anchor line at the prior swing point and a live line at the current extreme. The direction flips automatically when price breaks beyond the opposite swing, keeping the chart aligned with the active trend.
It tracks leg size, live pullback %, and the deepest (static) pullback so far in the leg. A compact two-row stats panel displays the current leg metrics on top and the most recent up- and down-leg sizes beneath for quick reference.
Highlights:
Evolution of the Simple Swing indicator
Auto-flip between up/down legs on swing breaks
Real-time pullback and static pullback tracking
Displays last completed up/down leg sizes
Minimal two-line layout (swing + live extreme)
Compact color-coded stats table
It tracks leg size, live pullback %, and the deepest (static) pullback so far in the leg. A compact two-row stats panel displays the current leg metrics on top and the most recent up- and down-leg sizes beneath for quick reference.
Highlights:
Evolution of the Simple Swing indicator
Auto-flip between up/down legs on swing breaks
Real-time pullback and static pullback tracking
Displays last completed up/down leg sizes
Minimal two-line layout (swing + live extreme)
Compact color-coded stats table
開源腳本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免責聲明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
開源腳本
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
免責聲明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.