OPEN-SOURCE SCRIPT
Svopex Swing

Svopex Swing
A pivot-based swing-level indicator that marks every confirmed high and low with a horizontal line and a price box, then automatically tracks whether the
level has been filled (revisited) or remains untested. Originally built on top of LeviathanCapital's swing engine and adapted with extra filters and styling
for cleaner crypto and futures workflows.
What it does
The indicator detects pivot highs and pivot lows using configurable left/right bar lookbacks and draws:
- A horizontal line at every swing high (sell-side liquidity) and swing low (buy-side liquidity)
- A price box above/below the swing point that visualizes the level's "thickness" and accepts optional volume / OI text inside it
- A circle marker at the exact pivot bar so the swing point is easy to spot
Each level extends to the right until price comes back and fills it (high ≥ level ≥ low). Filled levels can be hidden, kept on chart, or trimmed
automatically.
Open Interest delta confluence
This is the indicator's main differentiator: each pivot is tagged with the Open Interest delta at the swing bar, aggregated from up to six perp feeds:
- Binance USDT.P / USD.P / BUSD.P
- BitMEX USD.P / USDT.P
- Kraken USD.P
Each feed has its own toggle so you can include only the venues you care about. The OI delta is then used to filter which swings get drawn:
- Positive OI Delta — show only swings that printed alongside increasing open interest (fresh longs / fresh shorts being added)
- Negative OI Delta — show only swings printed during OI-decline (position unwinding)
- / (off) — show all swings regardless of OI direction
Combined with a volume threshold and abs(OI delta) threshold, you can isolate only the most institutionally-loaded pivots and ignore retail noise.
Inputs
Detection
- Bars Right / Bars Left — pivot lookback (default 10 / 15)
- Lookback (D) — only draw swings within the last N days
Filters
- Volume > — minimum bar volume at the pivot
- OI Δ (abs.) > — minimum absolute open-interest change at the pivot
- Only Swings With — Positive / Negative / any OI delta
- Hide Filled — drop levels once price retraces through them
- Extend Until Fill — keep extending the line right-ward until it's hit
OI Sources
- Per-exchange / per-feed toggles for the six supported perp pairs
Appearance
- Show Boxes / Lines / Labels — independent toggles
- Show Volume / Show OI Δ — render the values inside the box text
- Highs color / Lows color — line + label + box colors per side
- Line Style — Solid / Dashed / Dotted, plus width
- Box Width / Box Type — TYPE 1 (snap to pivot) or TYPE 2 (% offset from pivot)
- Text Size & H-align — Tiny / Small / Normal / Large / Auto, left/center/right
How to use
1. Liquidity mapping — every untested swing high above current price is a pool of sell-side stops; every untested swing low below is buy-side stops. Use them
as targets and reaction points.
2. OI-loaded pivots — turning on the Positive OI Delta filter highlights only the swings where new positioning was added. These tend to be the strongest
levels because trapped longs/shorts defend them.
3. Trend bias — if recent highs are being filled (taken out) while lows stay untested, the bias is bullish, and vice versa.
4. Multi-timeframe — run the indicator twice on the same chart with different left/right values for a layered view (e.g., 5/5 for fast, 20/20 for structural).
Tips
- OI feeds default to crypto perp tickers — the indicator works best on BTC, ETH, SOL and other coins with active futures. On stocks/forex/indices, leave OI
filters off (set "/" and zero thresholds) and use it as a pure pivot tool.
- The Lookback (D) input is essential on long charts — without it the indicator can hit the 500-line/box cap and stop drawing.
- Combine Show OI Δ with Hide Filled = OFF to build a heat-map of where futures positioning was historically loaded.
Credits
- Base swing/pivot engine and OI aggregation by © LeviathanCapital — thank you.
- Filter, styling, and workflow adjustments by Svopex.
Open source under MPL 2.0 — fork, adapt, and share.
A pivot-based swing-level indicator that marks every confirmed high and low with a horizontal line and a price box, then automatically tracks whether the
level has been filled (revisited) or remains untested. Originally built on top of LeviathanCapital's swing engine and adapted with extra filters and styling
for cleaner crypto and futures workflows.
What it does
The indicator detects pivot highs and pivot lows using configurable left/right bar lookbacks and draws:
- A horizontal line at every swing high (sell-side liquidity) and swing low (buy-side liquidity)
- A price box above/below the swing point that visualizes the level's "thickness" and accepts optional volume / OI text inside it
- A circle marker at the exact pivot bar so the swing point is easy to spot
Each level extends to the right until price comes back and fills it (high ≥ level ≥ low). Filled levels can be hidden, kept on chart, or trimmed
automatically.
Open Interest delta confluence
This is the indicator's main differentiator: each pivot is tagged with the Open Interest delta at the swing bar, aggregated from up to six perp feeds:
- Binance USDT.P / USD.P / BUSD.P
- BitMEX USD.P / USDT.P
- Kraken USD.P
Each feed has its own toggle so you can include only the venues you care about. The OI delta is then used to filter which swings get drawn:
- Positive OI Delta — show only swings that printed alongside increasing open interest (fresh longs / fresh shorts being added)
- Negative OI Delta — show only swings printed during OI-decline (position unwinding)
- / (off) — show all swings regardless of OI direction
Combined with a volume threshold and abs(OI delta) threshold, you can isolate only the most institutionally-loaded pivots and ignore retail noise.
Inputs
Detection
- Bars Right / Bars Left — pivot lookback (default 10 / 15)
- Lookback (D) — only draw swings within the last N days
Filters
- Volume > — minimum bar volume at the pivot
- OI Δ (abs.) > — minimum absolute open-interest change at the pivot
- Only Swings With — Positive / Negative / any OI delta
- Hide Filled — drop levels once price retraces through them
- Extend Until Fill — keep extending the line right-ward until it's hit
OI Sources
- Per-exchange / per-feed toggles for the six supported perp pairs
Appearance
- Show Boxes / Lines / Labels — independent toggles
- Show Volume / Show OI Δ — render the values inside the box text
- Highs color / Lows color — line + label + box colors per side
- Line Style — Solid / Dashed / Dotted, plus width
- Box Width / Box Type — TYPE 1 (snap to pivot) or TYPE 2 (% offset from pivot)
- Text Size & H-align — Tiny / Small / Normal / Large / Auto, left/center/right
How to use
1. Liquidity mapping — every untested swing high above current price is a pool of sell-side stops; every untested swing low below is buy-side stops. Use them
as targets and reaction points.
2. OI-loaded pivots — turning on the Positive OI Delta filter highlights only the swings where new positioning was added. These tend to be the strongest
levels because trapped longs/shorts defend them.
3. Trend bias — if recent highs are being filled (taken out) while lows stay untested, the bias is bullish, and vice versa.
4. Multi-timeframe — run the indicator twice on the same chart with different left/right values for a layered view (e.g., 5/5 for fast, 20/20 for structural).
Tips
- OI feeds default to crypto perp tickers — the indicator works best on BTC, ETH, SOL and other coins with active futures. On stocks/forex/indices, leave OI
filters off (set "/" and zero thresholds) and use it as a pure pivot tool.
- The Lookback (D) input is essential on long charts — without it the indicator can hit the 500-line/box cap and stop drawing.
- Combine Show OI Δ with Hide Filled = OFF to build a heat-map of where futures positioning was historically loaded.
Credits
- Base swing/pivot engine and OI aggregation by © LeviathanCapital — thank you.
- Filter, styling, and workflow adjustments by Svopex.
Open source under MPL 2.0 — fork, adapt, and share.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.