OPEN-SOURCE SCRIPT

QTP - Stochastic RSI

422
QTP - Stochastic RSI

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔬 Overview

The QTP Stochastic RSI applies a Stochastic oscillator to RSI values rather than raw price — producing a faster, more sensitive momentum reading that catches overbought and oversold conditions earlier than either indicator alone. Designed with a high-contrast dark panel and electric blue/hot pink color scheme for instant visual clarity during fast-moving markets.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚙️ How It Works

The indicator first calculates a standard RSI over a configurable period, then runs a Stochastic calculation on that RSI output. This double-processing amplifies momentum shifts — the Stochastic RSI reaches 0 and 100 far more frequently than a standard RSI, making it more responsive to turning points.

The %K line (electric blue) represents the smoothed Stochastic of RSI. The %D line (hot pink) is a moving average of %K, acting as a signal line. Crossovers between %K and %D at overbought or oversold extremes mark potential reversal zones.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 Key Features

◆ RSI-Based Stochastic — Stochastic calculation applied to RSI values instead of price, producing a more sensitive and earlier-reacting oscillator

◆ Independent Length Controls — RSI Length and Stochastic Length are configured separately, giving full control over the indicator's responsiveness and smoothing

◆ Smoothed %K and %D Lines — Adjustable K and D smoothing factors to tune signal quality from aggressive (low smoothing) to conservative (high smoothing)

◆ High-Contrast Dark Panel — Black background fill between the OB/OS bands creates a clean, high-visibility display that stands out on any chart theme

◆ Electric Blue / Hot Pink Color Scheme — Purpose-chosen colors that are visually distinct from each other and from standard chart elements, reducing eye strain during extended sessions

◆ Configurable Levels — Upper band, lower band, and middle reference line are all adjustable inputs — not hardcoded — so you can fine-tune thresholds to match your trading style

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📐 How To Use

Add the indicator to your chart — it appears in a separate lower panel with a dark background for contrast.

Watch for %K (blue) crossing above %D (pink) below the lower band — this signals a potential bullish reversal from oversold conditions.

Watch for %K (blue) crossing below %D (pink) above the upper band — this signals a potential bearish reversal from overbought conditions.

Crossovers in the middle zone (20-80) indicate momentum shifts but carry less conviction than crosses at the extremes.

For scalping and intraday, lower the RSI Length and Stochastic Length (e.g. 7/7) for faster signals. For swing trading, keep the defaults (14/14) or increase for smoother readings.

Adjust the K and D smoothing to control noise — lower values (1-2) give raw, fast signals while higher values (5-7) produce cleaner but slower crossovers.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Settings Overview

◆ K Smoothing — Smoothing applied to the raw Stochastic of RSI (default: 3)
◆ D Smoothing — Signal line smoothing applied to %K (default: 3)
◆ RSI Length — Lookback period for the underlying RSI calculation (default: 14)
◆ Stochastic Length — Lookback period for the Stochastic applied to RSI (default: 14)
◆ RSI Source — Price source for RSI calculation (default: close)
◆ Upper Band — Overbought threshold (default: 80)
◆ Middle Band — Neutral reference line (default: 50)
◆ Lower Band — Oversold threshold (default: 20)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠️ Disclaimer

This indicator is a technical analysis tool designed to assist with market analysis. It does not constitute financial advice. Past performance is not indicative of future results. Always use proper risk management and perform your own due diligence before making trading decisions.

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.