OPEN-SOURCE SCRIPT

Improved Stoch RSI + Supertrend Filter

233
**Script Description: Improved Stoch RSI + Supertrend Filter**

This custom TradingView indicator combines two powerful tools—Stochastic RSI and Supertrend—to generate high-probability trade signals. It is designed for traders who prefer clear, filtered entries based on momentum and trend direction.

### Core Logic:

1. **Stochastic RSI Crossovers:**

* The indicator calculates a smoothed Stochastic RSI using user-defined lengths and smoothing parameters.
* Signals are only considered when a %K/%D crossover happens in extreme zones:

* **Bullish signal**: %K crosses above %D in the **oversold** zone.
* **Bearish signal**: %K crosses below %D in the **overbought** zone.

2. **Supertrend Filter:**

* The Supertrend indicator, based on ATR, filters trades by confirming the overall trend.
* Only **bullish crossovers** are signaled when the Supertrend is green (uptrend).
* Only **bearish crossovers** are signaled when the Supertrend is red (downtrend).

### Entry Conditions:

* **Long Entry:**

* %K crosses above %D in the oversold zone.
* Supertrend confirms an uptrend.

* **Short Entry:**

* %K crosses below %D in the overbought zone.
* Supertrend confirms a downtrend.

### Visual Aids:

* Buy and sell signals are plotted with green and red labels respectively.
* The Supertrend line is also plotted, switching color based on direction.

### Alerts:

* Custom alerts are set for both long and short conditions, making this script suitable for automated or alert-driven trading setups.

This script is ideal for swing and momentum traders looking to enter trades in strong trend conditions, filtering out noise and false reversals.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.