What problem this strategy targets
RSI extremes alone often whipsaw in trends. YinYang RSI Volume Trend Strategy builds a purchase zone from RSI and volume RSI: trades are considered when price leaves the zone, with optional stop-loss and a “cross the basis twice” take-profit filter.
It is a Pine Script v5 strategy() script, not an indicator(). The Strategy Tester can run it; Coinpred has not backtested it.

Logic overview
The script computes RSI(close, length) and an RSI on volume, combines them into purchaseZoneBasis, then purchaseZoneHigh/Low. Default Trend Length is 80.
Longs arm after price crosses under the lower band, then fire on a crossover back above it while longAvailable is true. Shorts are symmetric on the upper band. Exit Source drives exits, stops, and take-profit.
Entries
- Long: purchaseSrc crosses over purchaseZoneLow with longAvailable → strategy.entry("buy", strategy.long).
- Short: purchaseSrc crosses under purchaseZoneHigh with shortAvailable → strategy.entry("sell", strategy.short).
- Availability resets per Reset Purchase Availability After: Entry, Stop Loss, or None.
Exits, stops, take-profit, sizing
- Normal exit: long closes when exitSrc crosses over the upper band; short when it crosses under the lower band.
- Optional stop: Stoploss Multiplier % offsets beyond the zone; a touch flatters the trade.
- Optional take-profit: after crossing the basis to arm, a second opposing cross takes profit.
- Sizing uses the strategy defaults (no custom percent-of-equity inputs in this script).

Parameters (source defaults)
| Input | Default | Role |
|---|---|---|
| Trend Length | 80 | Lookback for RSI/volume band |
| Purchase Source | close | Source for zone entry tests |
| Exit Source | close | Source for exits/stops/TP |
| Use Take Profit | true | Enable basis double-cross TP |
| Use Stop Loss | true | Enable percent stop |
| Stoploss Multiplier % | 0.1 | Stop offset vs the zone |
| Reset Purchase Availability After | Entry | When availability resets |

Markets, timeframes, limits
- Author showcase: BINANCE:BTCUSDT, 15 minutes. Other markets need your own checks.
- Repaint: not specially tested by Coinpred.
- No external Pine library imports; no request.security.
- Includes an alert() template you must configure yourself.

TradingView setup guide
- Download the .pine file from Coinpred (membership required; see below) or compare with the original publication page.
- Open TradingView → Pine Editor, create a blank script, paste the full source, then save.
- Click Add to chart. Confirm it is a strategy() script so the Strategy Tester is available.
- Review defaults in the Inputs panel using the parameter table below, then tune for your symbol and timeframe.
- Inspect signals in the Strategy Tester before wiring alerts. Historical curves are not a promise of future results.
Verification and backtests
Download rights and version notes
- Author: YinYangAlgorithms; original title: YinYang RSI Volume Trend Strategy; version: 1.0 (pine-facade).
- License: MPL 2.0; Coinpred ships the unmodified full source file.
- Original page: https://www.tradingview.com/script/cO34DTxx-YinYang-RSI-Volume-Trend-Strategy/
- Pine version: v5; type: strategy().
- Charts are author showcase images; image rights are outside MPL and captions are labeled accordingly.
- Downloads follow Coinpred membership rules; modified source files must remain under MPL 2.0.
