OPEN-SOURCE SCRIPT
TSI in Dynamic Zones with Divergence v2.2

HOW TO READ IT
A momentum companion oscillator built around the True Strength Index (TSI), with adaptive overbought/oversold zones, automatic divergence detection, and a volatility-context dashboard. Designed to ride underneath a price-chart framework (MA stack / squeeze / trigger systems) as the momentum second opinion: the price chart tells you where, this tells you how much force is behind it. Adapted from the open-source GPL-3.0 "TSI in Dynamic Zones with Divergence" with Pine v6 fixes and display work; published under the same license.
THE 30-SECOND VERSION
Cyan line = TSI (momentum). Orange line = its signal. Cyan above orange = bulls in control; below = bears. The shaded orange band on top and aqua band on the bottom are NOT fixed levels — they're dynamic zones that adapt to the last 70 bars, so "overbought" on a quiet day sits lower than on a wild one. Momentum reaching into a zone is stretched; turning back out of one is the actionable part. Green/red labels on the oscillator are divergences: price and momentum disagreeing, which is an early-warning sign, not an entry by itself.
WHAT EACH ELEMENT MEANS
TSI + signal cross — The basic momentum read. Crosses above zero carry more weight than crosses below it for longs, and vice versa.
Dynamic zones (orange top / aqua bottom) — Percentile-based adaptive OB/OS. Entering a zone = stretched. Exiting back through it = momentum actually turning.
Divergence labels — Green (bullish): price made a lower low but TSI made a higher low — selling force is fading. Red (bearish): price higher high, TSI lower high — buying force is fading. Hidden divergences (aqua/orange, off by default) are continuation signals rather than reversal signals.
White triangles — TSI pivot highs/lows at stretched readings; minor structure inside the oscillator.
Orange / aqua cross markers (top and bottom rows) — A sequence of signal-line cross-bounces that's deteriorating (orange, possible top) or improving (aqua, possible bottom). "Maybe" signals — context, not triggers.
Column colors behind the TSI — Kumo-based implied volatility heat: white/silver/aqua = quiet, yellow/orange = elevated, red/dark red = extreme. Divergences and zone touches mean more when volatility is waking up.
DASHBOARD
TSI — Current value and regime (BULL/BEAR, above/below zero).
Zones — Today's adaptive buy/sell thresholds, so you know what counts as stretched right now.
BB % — Where price sits inside its Bollinger Bands (0 = lower band, 1 = upper).
BBW % — Bollinger Band Width percentile. Under 7 = SQUEEZE (compression — pair this with your price chart's squeeze state). Over 70 = EXPANDED.
MFI — Money Flow Index: volume-weighted momentum, OB above 80 / OS below 20.
Kumo IV — The volatility regime in words, MINIMAL through EXTREME.
SMALL SCREENS — TINY AND COMPACT MODES
Settings → Inputs → Dashboard:
• Dashboard text size — Tiny / Small / Normal. Tiny roughly halves the footprint; recommended on phones and small laptops.
• Dashboard mode — Full shows all 6 rows. Compact merges everything into 3 short rows: TSI value + regime, the two zone thresholds, and a one-line volatility readout (BBWP · IV · MFI). Phone recipe: Compact + Tiny + a corner position.
• Dashboard position — six anchor choices to keep it out of the oscillator's way.
KEY SETTINGS
TSI lengths (5/12/10) — Faster than the textbook 25/13 on purpose; built for intraday timeframes.
Cross signal threshold (±) — Gates the orange/aqua cross-bounce markers to crosses beyond ± this value. Default 0 (any cross past zero); raise toward 30 to only flag crosses at stretched readings.
Divergence pivot lookbacks — Lower left-lookback = more signals, more noise. 5 is aggressive; 8–10 is conservative.
Filter crossovers by BBWP — On by default: zero-line crossover alerts are suppressed during squeezes, when chop makes them unreliable.
Hidden divergences — Off by default; turn on if you trade continuation setups.
HONEST LIMITATIONS
Divergence labels confirm one bar after the pivot — the label appears with a delay by design, and acting on an unconfirmed wiggle is how divergence trading goes wrong. Divergences fail routinely in strong trends; momentum can stay "wrong" far longer than a position can. The dynamic zones need their full lookback (70 bars) of history to mean anything — ignore them in the first bars of a newly listed symbol or a fresh session on low-history tickers. This oscillator describes momentum; it knows nothing about structure, levels, or news. Read it alongside a price framework, not instead of one.
This is a study tool, not trade advice, and not an executor. Nothing here is a recommendation to buy or sell anything. Test it, judge the signals against what actually happened, and size your own risk.
A momentum companion oscillator built around the True Strength Index (TSI), with adaptive overbought/oversold zones, automatic divergence detection, and a volatility-context dashboard. Designed to ride underneath a price-chart framework (MA stack / squeeze / trigger systems) as the momentum second opinion: the price chart tells you where, this tells you how much force is behind it. Adapted from the open-source GPL-3.0 "TSI in Dynamic Zones with Divergence" with Pine v6 fixes and display work; published under the same license.
THE 30-SECOND VERSION
Cyan line = TSI (momentum). Orange line = its signal. Cyan above orange = bulls in control; below = bears. The shaded orange band on top and aqua band on the bottom are NOT fixed levels — they're dynamic zones that adapt to the last 70 bars, so "overbought" on a quiet day sits lower than on a wild one. Momentum reaching into a zone is stretched; turning back out of one is the actionable part. Green/red labels on the oscillator are divergences: price and momentum disagreeing, which is an early-warning sign, not an entry by itself.
WHAT EACH ELEMENT MEANS
TSI + signal cross — The basic momentum read. Crosses above zero carry more weight than crosses below it for longs, and vice versa.
Dynamic zones (orange top / aqua bottom) — Percentile-based adaptive OB/OS. Entering a zone = stretched. Exiting back through it = momentum actually turning.
Divergence labels — Green (bullish): price made a lower low but TSI made a higher low — selling force is fading. Red (bearish): price higher high, TSI lower high — buying force is fading. Hidden divergences (aqua/orange, off by default) are continuation signals rather than reversal signals.
White triangles — TSI pivot highs/lows at stretched readings; minor structure inside the oscillator.
Orange / aqua cross markers (top and bottom rows) — A sequence of signal-line cross-bounces that's deteriorating (orange, possible top) or improving (aqua, possible bottom). "Maybe" signals — context, not triggers.
Column colors behind the TSI — Kumo-based implied volatility heat: white/silver/aqua = quiet, yellow/orange = elevated, red/dark red = extreme. Divergences and zone touches mean more when volatility is waking up.
DASHBOARD
TSI — Current value and regime (BULL/BEAR, above/below zero).
Zones — Today's adaptive buy/sell thresholds, so you know what counts as stretched right now.
BB % — Where price sits inside its Bollinger Bands (0 = lower band, 1 = upper).
BBW % — Bollinger Band Width percentile. Under 7 = SQUEEZE (compression — pair this with your price chart's squeeze state). Over 70 = EXPANDED.
MFI — Money Flow Index: volume-weighted momentum, OB above 80 / OS below 20.
Kumo IV — The volatility regime in words, MINIMAL through EXTREME.
SMALL SCREENS — TINY AND COMPACT MODES
Settings → Inputs → Dashboard:
• Dashboard text size — Tiny / Small / Normal. Tiny roughly halves the footprint; recommended on phones and small laptops.
• Dashboard mode — Full shows all 6 rows. Compact merges everything into 3 short rows: TSI value + regime, the two zone thresholds, and a one-line volatility readout (BBWP · IV · MFI). Phone recipe: Compact + Tiny + a corner position.
• Dashboard position — six anchor choices to keep it out of the oscillator's way.
KEY SETTINGS
TSI lengths (5/12/10) — Faster than the textbook 25/13 on purpose; built for intraday timeframes.
Cross signal threshold (±) — Gates the orange/aqua cross-bounce markers to crosses beyond ± this value. Default 0 (any cross past zero); raise toward 30 to only flag crosses at stretched readings.
Divergence pivot lookbacks — Lower left-lookback = more signals, more noise. 5 is aggressive; 8–10 is conservative.
Filter crossovers by BBWP — On by default: zero-line crossover alerts are suppressed during squeezes, when chop makes them unreliable.
Hidden divergences — Off by default; turn on if you trade continuation setups.
HONEST LIMITATIONS
Divergence labels confirm one bar after the pivot — the label appears with a delay by design, and acting on an unconfirmed wiggle is how divergence trading goes wrong. Divergences fail routinely in strong trends; momentum can stay "wrong" far longer than a position can. The dynamic zones need their full lookback (70 bars) of history to mean anything — ignore them in the first bars of a newly listed symbol or a fresh session on low-history tickers. This oscillator describes momentum; it knows nothing about structure, levels, or news. Read it alongside a price framework, not instead of one.
This is a study tool, not trade advice, and not an executor. Nothing here is a recommendation to buy or sell anything. Test it, judge the signals against what actually happened, and size your own risk.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.