TSI Dual Levels - Custom TF**TSI Dual Levels — Script Note**
*by LEGOLAS*
---
**Credits & Attribution**
**True Strength Index (TSI)**
Originally developed by **William Blau**, published in *Stocks & Commodities Magazine* (1991) and his book *Momentum, Direction and Divergence* (1995). The core TSI calculation and double-smoothing methodology used in this script belongs entirely to William Blau.
**Relative Strength Index (RSI)**
Originally developed by **J. Welles Wilder Jr.**, published in *New Concepts in Technical Trading Systems* (1978). The overbought and oversold zone concept used in this script is inspired by his work.
**TradingView Pine Script Team**
Full credit to the TradingView development team for their built-in open-source TSI and RSI implementations available on the platform. This script reuses elements of TradingView's open-source built-in TSI code as permitted under TradingView's public domain exception for standard classic indicators. All credit for those implementations belongs to TradingView.
---
**Disclaimer**
This script is a custom visual adaptation. LEGOLAS does not claim ownership of any underlying mathematics, formulas, or base Pine Script implementations. This is published open-source in full compliance with TradingView's open-source reuse rules. No performance claims are made. Past behavior of any indicator does not guarantee future results. This script is for educational and informational purposes only and does not constitute financial advice.
---
**What does it do?**
TSI Dual Levels takes the standard True Strength Index and adds two significant original features on top of it:
1. A **dual-level overbought and oversold zone system** — giving traders two thresholds to watch rather than one, helping distinguish between a warning level and an extreme level.
2. A **dynamic color-coded momentum signal system** — the TSI line changes color in real time based on the strength of each bar's momentum move, something not present in the standard TSI.
The indicator also supports a **custom timeframe input**, allowing traders to display TSI values from a higher timeframe on any lower timeframe chart.
---
**The Zones**
There are 4 adjustable levels:
- **Overbought Zone 2 (Extreme)** — default 50. Momentum extremely stretched to the upside. Caution on longs.
- **Overbought Zone 1** — default 25. Momentum entering overbought territory. Watch for slowdowns.
- **Oversold Zone 1** — default -25. Momentum entering oversold territory. Watch for bounces.
- **Oversold Zone 2 (Extreme)** — default -50. Momentum extremely stretched to the downside. Caution on shorts.
The area between Zone 1 and Zone 2 is shaded as a warning fill. The neutral zone between overbought and oversold is also shaded separately so you can visually identify where momentum sits at a glance.
---
**The Color System**
The TSI line changes color based on the size of each bar's momentum move. This is the original feature of this script:
- 🟢 **Bright Green** — TSI moves up by 1 or more points on this bar. Strong confirmed bullish momentum.
- 🟩 **Lime Green** — TSI moves up but by less than 1 point. Momentum nudging positive, weak conviction. Watch but do not act on this alone.
- 🔴 **Bright Red** — TSI drops by 1 or more points on this bar. Strong confirmed bearish momentum.
- 🟠 **Orange** — TSI drops but by less than 1 point. Momentum nudging negative, weak conviction. Watch but do not act on this alone.
The rule is simple — if the TSI moves by 1 or more points in a single bar, the line flips to the strong color. Green for 1 or more points up. Red for 1 or more points down. If the move is less than 1 point in either direction the line stays in the weak shade — lime or orange — telling you that momentum is moving but has not committed yet. A move of less than 1 point means drift. A move of 1 or more points means drive.
All 4 colors are fully customizable in the settings.
---
**Settings**
- **Timeframe** — display TSI from a higher timeframe on your current chart
- **Long Length** — controls the first EMA smoothing period (default 25)
- **Short Length** — controls the second EMA smoothing period (default 13)
- **Signal Length** — controls the signal line EMA period (default 13)
- **Overbought / Oversold Levels** — all 4 zone values are fully adjustable
- **4 TSI Line Colors** — strong up, weak up, strong down, weak down
---
**What makes this original**
The standard TradingView TSI has a single color line and no dual-level zone structure. The original additions in this script are the dual overbought/oversold zone system, the per-bar momentum strength color logic using the 1 or more points threshold, and the multi-timeframe input. These features combined give traders a visual momentum read that the standard TSI does not provide.
---
*All TSI mathematics belong to William Blau. RSI zone concept belongs to J. Welles Wilder Jr. TradingView built-in implementations are the property of TradingView. This script is published open-source by LEGOLAS. No financial advice is given or implied. Past indicator behavior does not guarantee future results.*
Indikator Pine Script®






















