PROTECTED SOURCE SCRIPT

SWRSI Trends (Source Out)

54
Overview SWRSI Trends is a specialized momentum indicator based on the Relative Strength Index (RSI). While it functions as a visual trading aid with bar coloring and signal shapes, its primary purpose is to serve as a modular signal provider for other strategies and backtesting bots on TradingView.

It detects trend reversals by monitoring RSI crossovers at specific custom levels (Default: 60 and 40), rather than the standard 70/30 extreme zones.

Key Features

1. External Source Outputs (Connect to Bots) This script includes hidden plot outputs specifically designed to interface with other scripts.

RSI LONG SIGNAL (Source): Outputs a value of 1 when a Long condition is met, 0 otherwise.

RSI SHORT SIGNAL (Source): Outputs a value of 1 when a Short condition is met, 0 otherwise.

Usage: You can select these outputs as the "Entry Source" in compatible Strategy scripts or Backtest Bots without needing to copy-paste code.

2. Signal Logic

Long Signal: Triggered when the RSI line crosses OVER the Lower Threshold (Default: 40). This indicates momentum is recovering from the lower zone.

Short Signal: Triggered when the RSI line crosses UNDER the Upper Threshold (Default: 60). This indicates momentum is cooling off from the upper zone.

3. Visual Aids

Bar Coloring: Candles change color based on RSI position (Green above 60, Red below 40).

Dynamic Line: The RSI line changes color to reflect the current zone.

Settings

RSI Length: The lookback period for calculation (Default: 14).

Short Threshold: Level for bearish crossover (Default: 60).

Long Threshold: Level for bullish crossover (Default: 40).

Color Bars: Toggle candle painting on/off.

How to Connect to Another Indicator

Add SWRSI Trends to your chart.

Open the settings of your Target Strategy/Bot (e.g., SwietcherBot).

In the "Source" or "External Signal" input field, select "SWRSI Trends: RSI LONG SIGNAL" or "RSI SHORT SIGNAL" from the dropdown menu.

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.