Strategy · Pine Script v6 · On the chart

Tn Sovereign Stoch v6

by raybird

This strategy computes a Stochastic Oscillator K and D lines with customizable length, smooth periods, and overbought/oversold thresholds.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code86
Settings9inputs
LicenceNone stated
Last update2 months ago15 Aug 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Tn Sovereign Stoch v6 generates long signals on K/D crossover below the oversold level in a bullish regime defined by price above a 200 EMA, and short signals on crossover above the overbought level in a bearish regime. Entries use percent-of-equity sizing with 2x ATR stop loss and 4x ATR take profit exits on the opposite side. The script plots on the price chart with a table HUD displaying K/D values, regime bias, and volatility metrics. Inputs modify stochastic parameters, trend filter, ATR settings, and risk multipliers. It applies across markets and timeframes with one position at a time.

Details

Published by

raybird on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Oscillators & momentum, Mean reversion, Trend

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

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

SettingTypeDefaultVariable
隨機指標長度int14stochLen
K 線平滑int3kSmooth
D 線平滑int3dSmooth
超買門檻 (OB)float80obLevel
超賣門檻 (OS)float20osLevel
趨勢地板 (EMA)int200emaLen
ATR 週期int14atrLen
止損 ATR 倍數float2.0slMult
獲利 ATR 倍數float4.0tpMult
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

285 stars

Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish

Strategy v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Strategy

ADX + RSI Strat

by hasnocool
106 stars

This strategy combines a 7-period RSI with an ADX filter to trade market regimes on the price chart. When the ADX indicates ranging conditions below a set threshold, it triggers entries on RSI overbought or oversold extremes. By default, the entry logic is inv

Strategy v4 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of ADX + RSI Strat

ADX Trend Filter

by latentwill
4 stars

This strategy enters long when a series labeled ADX is above a threshold and RSI is below 40, and enters short when that series is above the threshold and RSI is above 60. Both series are calculated with the RSI function, so the trend filter is not a true ADX.

Strategy v5 TrendOscillators & momentum
Updated 6 days ago · None stated GitHub repository of ADX Trend Filter
4 stars

This strategy trades pullbacks in the direction of a moving-average trend and draws on the price chart. An uptrend requires the 50-period EMA above the 200-period EMA with price above the slower average, and a downtrend is the reverse. It enters long or short

Strategy v6 TrendOscillators & momentum

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