OPEN-SOURCE SCRIPT

Smart Swing Trend Stochastic RSI - TP

484
Absolutely friend. Here is a **TradingView rule-abiding publication description** you can use.

---

## Smart Swing Trend Stochastic RSI

**Smart Swing Trend Stochastic RSI** is a trend-aware Stochastic RSI indicator designed to help traders interpret momentum extremes with better market context.

Traditional Stochastic RSI often treats readings above 80 as “overbought” and readings below 20 as “oversold.” However, in strong trends, these extreme zones can remain extended for a long time. This script adds swing-trend context so the 80/20 zones are interpreted differently depending on whether the market is in a swing uptrend or swing downtrend.

The goal is to help traders avoid automatically fading strong momentum and instead separate trend strength from potential turning points.

---

## Core Concept

This indicator combines:

1. **Stochastic RSI**
2. **Swing-based trend direction**
3. **Trend-aware shaded zones**
4. **Simple table interpretation**
5. **Momentum turn and warning signals**

The script does not treat every overbought or oversold reading as a reversal. Instead, it asks:

> Is this Stoch RSI extreme showing trend power, or is it starting to become a possible pullback/bounce warning?

---

## How the Trend Logic Works

The trend logic is based on swing direction, adapted from the swing logic concept used in Zeiierman’s Dynamic Swing Anchored VWAP.

The script identifies recent swing highs and swing lows using the selected **Swing Period**.

In simple terms:

* **Swing Uptrend** means the current swing structure favors the upside.
* **Swing Downtrend** means the current swing structure favors the downside.
* **Swing Neutral** can appear when the optional neutral mode is enabled after a recent direction change.

This allows the Stochastic RSI to be interpreted based on the current swing environment instead of using a fixed moving average trend filter.

---

## Signal Meanings

### Bullish Turn

A **Bullish Turn** appears when the swing trend is up and Stochastic RSI recently reached the lower zone, then starts turning upward.

This can suggest that short-term momentum may be turning back up after a pullback.

Simple meaning:

> Momentum may be turning up in a swing uptrend.

---

### Bearish Turn

A **Bearish Turn** appears when the swing trend is down and Stochastic RSI recently reached the upper zone, then starts turning downward.

This can suggest that short-term momentum may be turning back down after a bounce.

Simple meaning:

> Momentum may be turning down in a swing downtrend.

---

### Pullback Warning

A **Pullback Warning** appears when the market is in a swing uptrend, Stochastic RSI is in the upper zone, and momentum starts rolling over while price is extended.

This does not automatically mean the trend is over. It is a caution signal.

Simple meaning:

> Price may be stretched in an uptrend. Be careful chasing late.

---

### Bounce Warning

A **Bounce Warning** appears when the market is in a swing downtrend, Stochastic RSI is in the lower zone, and momentum starts turning upward while price is extended.

This does not automatically mean a new uptrend has started. It is a caution signal for shorts.

Simple meaning:

> Price may be stretched in a downtrend. Be careful shorting late.

---

## Shaded Zone Interpretation

The shaded areas are trend-aware:

* **Gray upper zone**: Stoch RSI is above 80, but in an uptrend this can still represent bullish power.
* **Red upper zone**: Momentum may be rolling over and pullback risk may be increasing.
* **Gray lower zone**: Stoch RSI is below 20, but in a downtrend this can still represent bearish power.
* **Green lower zone**: Momentum may be turning up and bounce potential may be increasing.

This helps avoid the common mistake of assuming:

* Above 80 always means sell.
* Below 20 always means buy.

In strong trends, extremes can remain extended.

---

## Read Table

The table provides a simplified summary of the current condition:

* **Trend**: Current swing trend direction.
* **Zone**: Current Stoch RSI zone interpretation.
* **Signal**: Recent valid signal, if one is active.
* **Interpretation**: Simple plain-English read of the current condition.

The signal can be held for a selected number of bars using the **Hold Signal For Bars** setting.

---

## Key Settings

### RSI Length / Stochastic Length

Controls the sensitivity of the Stochastic RSI calculation.

Lower values react faster.
Higher values are smoother but slower.

### Swing Period

Controls how large or small the swing structure should be.

Lower values react faster but can create more noise.
Higher values focus on larger swing moves.

### Price Extension ATR Multiplier

Used to help identify when price may be stretched away from its swing anchor.

### Shaded Zone Transparency

Allows users to adjust the brightness/opacity of the gray, red, and green shaded areas.

### Table Text Size

Allows users to adjust the size of the table text.

---

## How to Use

This indicator is best used as a momentum and timing tool, not as a standalone trading system.

A possible bullish interpretation:

> Swing trend is up, Stoch RSI pulled into the lower zone, then a Bullish Turn appears.

A possible bearish interpretation:

> Swing trend is down, Stoch RSI bounced into the upper zone, then a Bearish Turn appears.

A caution example:

> In an uptrend, Stoch RSI above 80 may remain bullish power. A Pullback Warning only appears when momentum starts rolling over and price is extended.

---

## Important Notes

This indicator is for educational and analytical purposes only.

It does not guarantee future price movement and should not be used as financial advice. Traders should combine it with price structure, volume, support/resistance, risk management, and broader market context.

When the **Confirm Signals On Closed Bar** option is enabled, signals are designed to confirm only after the candle closes. Live candles can still change before closing.

---

## Attribution

Swing-direction trend logic is adapted from the concept used in **Dynamic Swing Anchored VWAP by Zeiierman**.

Original work licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International:

[creativecommons.org/licenses/by-nc-sa/4.0/](https://creativecommons.org/licenses/by-nc-sa/4.0/)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.