Strategy · Pine Script v6 · Own pane

Torque TSI Signal

by pineforge-4pass· code credited to PineForge

A long-only strategy built on the True Strength Index smoothed by an RMA signal line, shown in a separate pane with a minimum strength line.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code35
Settings5inputs
LicenceApache-2.0
Last update6 days ago23 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

35 lines of Pine Script v6 from validation/ta-torque-tsi-signal-01/strategy.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

strategy.pine
//@version=6
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 PineForge
// PineForge Owned Strategy: Torque TSI Signal
// A smoothed true-strength impulse must agree with the price regime.
strategy("PineForge — Torque TSI Signal", overlay=false,
     initial_capital=100000,
     default_qty_type=strategy.fixed, default_qty_value=2,
     pyramiding=0, commission_type=strategy.commission.percent,
     commission_value=0.05, slippage=1,
     margin_long=100, margin_short=100,
     process_orders_on_close=false, calc_on_order_fills=false)

shortLength = input.int(14, "TSI Short Length", minval=2, group="Signal")
longLength = input.int(29, "TSI Long Length", minval=3, group="Signal")
signalLength = input.int(9, "RMA Signal Length", minval=2, group="Signal")
trendLength = input.int(68, "Trend EMA Length", minval=5, group="Signal")
minimumStrength = input.float(0.0, "Minimum TSI Strength", minval=-1.0, maxval=1.0, step=0.01, group="Signal")

strength = ta.tsi(close, shortLength, longLength)
strengthSignal = ta.rma(strength, signalLength)
trendLine = ta.ema(close, trendLength)

enterLong = ta.crossover(strength, strengthSignal) and strength > minimumStrength and close > trendLine
momentumEnded = ta.crossunder(strength, strengthSignal)
regimeEnded = close < trendLine

if strategy.position_size == 0 and enterLong
    strategy.entry("Torque Long", strategy.long)
else if strategy.position_size > 0 and (momentumEnded or regimeEnded)
    strategy.close("Torque Long", comment=momentumEnded ? "Momentum ended" : "Regime ended")

plot(strength, "True Strength Index", color=color.blue)
plot(strengthSignal, "RMA Signal", color=color.orange)
hline(minimumStrength, "Minimum Strength", color=color.gray)

Overview

Torque TSI Signal enters long when the index crosses above its signal, exceeds a minimum strength and price is above a trend EMA. It exits when the index crosses back below its signal or price closes below the EMA. There is no separate stop loss.

Details

Published by

pineforge-4pass on GitHub

Code credit

PineForge, as written in the script's header

Type

Strategy, Pine Script v6

Draws

Separate pane below the chart

Category

Oscillators & momentum, Trend

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • The strategy enters trades without a stop loss

Topics

algorithmic-tradingbacktestingparitypine-scriptpinescriptquantitative-financetest-corpustradingview

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
TSI Short Lengthint14shortLength
TSI Long Lengthint29longLength
RMA Signal Lengthint9signalLength
Trend EMA Lengthint68trendLength
Minimum TSI Strengthfloat0.0minimumStrength
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

330 stars

MACD + Divergences [Alorse] is a momentum strategy that calculates the MACD oscillator and identifies regular and hidden divergences using pivot high and low points. It filters trade signals with dual Exponential Moving Averages (EMA 150 and 600) to ensure tra

Strategy v4 Oscillators & momentumDivergence Repaints
Updated 2 months ago · None stated GitHub repository of MACD + Divergences [Alorse]

Q-Trend + KVO Strategy

by TradersPost
218 stars

This strategy combines the ATR-banded Q-Trend indicator with the Klinger Volume Oscillator (KVO) to execute confluence trades. It enters long when a Q-Trend buy trigger aligns with a positive KVO value and a bullish candle confirmation, taking short trades und

Strategy v6 TrendVolume
Updated 3 months ago · None stated GitHub repository of Q-Trend + KVO Strategy

MACD Crossover (tutorial)

by pineforge-4pass
193 stars

This strategy calculates the Moving Average Convergence Divergence indicator and plots the MACD line, signal line, and histogram in a separate pane. It enters long positions when the MACD line crosses above the signal line and enters short positions when it cr

Strategy v6 Oscillators & momentumMoving averages
Updated yesterday · Apache-2.0 GitHub repository of MACD Crossover (tutorial)

ADX Strategy

by hasnocool
106 stars

An ADX-based trend-following strategy that enters long positions when the positive directional indicator (DI+) crosses above the Average Directional Index (ADX) while ADX remains below a preset threshold and a fast EMA is above a slow EMA. It allows adding to

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX Strategy

BTC MACD Basic Tests

by iamrichardD
57 stars

BTC MACD Basic Tests implements a Pine Script unit-testing framework designed to validate components of a long-only Bitcoin MACD trading system. It constructs structured test cases to evaluate mock functions for MACD crossover calculations, volume threshold ch

Strategy v6 Oscillators & momentumTrend
Updated 1 year ago · Apache-2.0 GitHub repository of BTC MACD Basic Tests

Trailering S002

by ruckard
13 stars

Trailering S002 is a long-only automated strategy template built for Zignaly webhook execution. It evaluates historical price stats and maximum excursion to trigger long trades, dynamically adjusting capital allocation based on active signal conditions. The sc

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Trailering S002

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers