OPEN-SOURCE SCRIPT

byquan RSI-MA & SRSI Direction Sync

351
// RSI-MA & SRSI Direction Sync

This indicator is designed to detect **momentum direction synchronization** between two different smoothed momentum oscillators across multiple timeframes.

Instead of simply plotting multiple oscillators, the core idea is to identify when two independent momentum calculations are moving **in the same direction at the same time** — providing a clearer view of underlying strength or weakness in price momentum.

### How It Works

**Line 1 – RSI-MA (30-minute base):**
- Calculates a 14-period RSI and then smooths it with a 14-period Simple Moving Average (SMA).
- This line is requested from the 30-minute timeframe to filter out some noise while remaining responsive.

**Line 2 – Multi-Timeframe SRSI "oranclose" (Smoothed):**
- Computes a Stochastic RSI (Stoch of RSI) using user-defined K & D smoothing.
- Aggregates this value from **four higher timeframes** (default: 3H, 6H, 12H, and Daily) to capture broader momentum context.
- The combined value is then smoothed with an EMA to reduce whipsaws.

**Direction Sync Detection:**
- The script checks whether both lines are rising simultaneously (**Both Up** — strong bullish momentum agreement) or falling simultaneously (**Both Down** — strong bearish momentum agreement).
- When directions align:
- Green color + background tint = bullish synchronization
- Red color + background tint = bearish synchronization
- Gray = no clear synchronization (momentum is mixed or weak)

### Why This Combination?

Many traders struggle with conflicting signals between fast and slow momentum tools. This script addresses that by:
- Using a shorter, smoothed RSI-MA as a more responsive "local" momentum reference.
- Using a multi-timeframe averaged Stochastic RSI as a "higher-timeframe bias" filter.
- Focusing purely on **directional agreement** rather than absolute levels.

This creates a simple yet effective way to visualize when short-term and broader momentum are aligned, which can help confirm trend strength or highlight potential exhaustion when they diverge.

### How to Use

- **Bullish Setup**: Look for consistent green lines and background. This suggests momentum is strengthening across different scales — favorable for long positions or holding longs.
- **Bearish Setup**: Look for consistent red lines and background. This indicates weakening momentum — potential short opportunities or caution for longs.
- The area fill between the two lines helps visualize the "spread" or convergence between the two momentum measures.
- Reference lines at 80 / 50 / 20 provide additional context for overbought/neutral/oversold zones.

**Recommended Timeframes:**
- Best used on 5m, 15m, or 30m charts for intraday/swing trading.
- The higher timeframes in Line 2 provide the necessary context without requiring you to switch charts.

**Settings Tips:**
- Adjust the "EMA Smooth Length" on Line 2 to make it more or less responsive.
- You can enable/disable the background color for a cleaner view.
- Experiment with different timeframe combinations in the "Line 2 · SRSI oranclose" group to match your trading style.

This tool does **not** generate buy/sell arrows on purpose — it is a **momentum alignment visualizer** meant to support your own price action and structure analysis. Always combine with proper risk management.

The script is open-source for transparency and educational purposes.

Feel free to experiment and share your feedback!

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.