indicator · own pane · open source
True Strength Index indicator
True Strength Index is a free open-source indicator. True Strength Index (TSI) double-smooths price momentum and divides it by the smoothed… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What True Strength Index does
True Strength Index (TSI) double-smooths price momentum and divides it by the smoothed absolute momentum, scaled to ±100. Quieter than RSI but with cleaner zero-line crosses.
- Above +25 = strong bullish, below -25 = strong bearish.
- Zero-line crosses are momentum signals.
- Raise
Slowfor fewer, slower swings.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("True Strength Index", overlay=false)
rlen = input.int(13, "Short Length", minval=2, maxval=100)
slen = input.int(25, "Long Length", minval=2, maxval=200)
src = input.source(close, "Source")
colorBg = input.color("color.purple", "Color Bg")
colorNeutral = input.color("color.gray", "Color Neutral")
momentum = ta.ema(ta.ema(ta.change(src), rlen), slen)
absm = ta.ema(ta.ema(math.abs(ta.change(src)), rlen), slen)
tsi = 100 * momentum / absm
hline(25, "Overbought", color=colorNeutral, linestyle=hline.style_dashed)
hline(-25, "Oversold", color=colorNeutral, linestyle=hline.style_dashed)
hline(0, "Zero", color=colorNeutral, linestyle=hline.style_dotted)
p_TSI = plot(tsi, "TSI", color=colorBg, linewidth=2)
alertcondition(ta.crossover(tsi, 0), "TSI crosses zero up", "True Strength Index turned positive")
alertcondition(ta.crossunder(tsi, 0), "TSI crosses zero down", "True Strength Index turned negative")
No comments yet.
Sign in to comment.