OPEN-SOURCE SCRIPT
ที่อัปเดต:

byquan RSI Opposite Double Cross MTF

416
// RSI Opposite Double Cross MTF

This indicator identifies **Opposite Double Cross** signals on RSI, designed to catch potential short-term reversals when RSI momentum fails to continue in its initial direction.

The core idea is based on a two-step RSI behavior within a short lookback window: an initial cross between RSI and its moving average, followed by an **opposite cross** in the opposite direction while respecting the 50 midline bias. This creates a contrarian signal that highlights exhaustion or rejection in momentum.

### How It Works

**Components:**
- RSI (default length 14) calculated on a user-selected timeframe (can be higher timeframe via MTF).
- Moving Average of RSI (default 9 periods, with choice of SMA, EMA, or RMA).
- Detects initial crossover (RSI crosses above MA) or crossunder (RSI crosses below MA).
- Monitors the next few bars (default 5-bar window) for an **opposite cross**.

**Signal Conditions:**
- **Sell Signal (Red Triangle)**: RSI first crosses above its MA, then crosses back down while the MA is still above 50. This suggests bullish momentum failed quickly.
- **Buy Signal (Green Triangle)**: RSI first crosses below its MA, then crosses back up while the MA is still below 50. This suggests bearish momentum failed quickly.

This "opposite double cross" logic within a limited bar window helps filter for high-probability mean-reversion moments around the central 50 level.

### Visual Elements
- **Blue Line**: Raw RSI
- **Orange Line**: RSI Moving Average
- Green/Red triangles plotted directly on the RSI line for clear signal visibility
- Horizontal lines at 30 (Oversold), 50 (Mid), and 70 (Overbought)

### How to Use

- **Buy Signal**: Green triangle appears when bearish momentum reverses quickly. Consider long positions, especially if price is near support or showing bullish structure.
- **Sell Signal**: Red triangle appears when bullish momentum reverses quickly. Consider short positions, especially if price is near resistance.
- Best used as a **confluence tool** together with price action, support/resistance levels, or higher timeframe trend analysis.
- The MTF feature allows you to use higher timeframe RSI dynamics on lower timeframe charts for stronger signals.

### Recommended Settings
- **Timeframe**: Current or one higher (e.g., use 15m on 5m chart, or 1H on 15m chart).
- **Lookback Bars**: 3–7 bars (smaller = more sensitive, larger = stricter).
- **MA Type**: EMA or RMA generally performs well for smoothing.
- Best suited for **intraday trading** on 5m, 15m, and 30m timeframes across forex, indices, and crypto.

This script is not just another RSI crossover indicator. Its originality comes from the **Opposite Double Cross detection logic** combined with MTF capability and the 50-level filter, aiming to capture failed momentum moves rather than trend following.

The indicator is open-source and shared for educational purposes only. It is not financial advice. Always backtest thoroughly and combine with proper risk management.

Feedback and ideas for improvement are welcome!
Release Note
// RSI Opposite 2 Cat Ban 2

This is an improved version of the RSI Opposite Double Cross indicator. It detects **failed momentum moves** (opposite crosses) and includes flexible user-adjustable filters for more precise signal control.

### Key Improvement Over Previous Version
Unlike the older version that used a **fixed 50 level** as the midline filter, this script introduces **independent adjustable filters** for Buy and Sell signals:

- **Buy Filter** (default 50): Sell signal is only valid when the RSI MA is **above** this level at the time of the opposite cross.
- **Sell Filter** (default 50): Buy signal is only valid when the RSI MA is **below** this level at the time of the opposite cross.

This enhancement gives traders greater flexibility to adapt the indicator to different market conditions, volatility, or trading styles (e.g., raising the Sell Filter to 55 for stricter short signals, or lowering the Buy Filter to 45 for more aggressive long entries).

### How It Works

**Core Logic:**
- Calculates RSI and its Moving Average (SMA, EMA, or RMA) on a user-selectable timeframe (MTF supported).
- Detects the first crossover/crossunder between RSI and its MA.
- Monitors the next bars (default 10-bar window) for an **opposite cross**.
- Applies the user-defined Buy/Sell filters to confirm signal quality.

**Signal Rules:**
- **Sell Signal (Red Triangle)**: RSI crosses above MA then crosses back down **while MA is still above the Sell Filter level**.
- **Buy Signal (Green Triangle)**: RSI crosses below MA then crosses back up **while MA is still below the Buy Filter level**.

This logic helps identify exhaustion points where momentum quickly fails.

### Visual Elements
- **Blue Line**: RSI
- **Orange Line**: RSI Moving Average
- **Dashed Red Line**: Sell Filter Level
- **Dashed Green Line**: Buy Filter Level
- Green/Red triangles plotted directly on the RSI line for clear visibility

### How to Use
- **Buy Signal** (Green): Failed bearish momentum → potential long opportunity.
- **Sell Signal** (Red): Failed bullish momentum → potential short opportunity.
- Use as a **confluence tool** with price action, support/resistance, or higher timeframe structure.
- The MTF feature allows using higher timeframe RSI behavior on lower timeframe charts.

### Recommended Settings
- **Bars Window**: 6–12 bars
- **Buy/Sell Filter**: Start with 50. Adjust higher (52–58) for stricter signals or lower (42–48) for more frequent signals.
- **MA Type**: EMA or RMA recommended.
- Best on **5m to 1H** timeframes for intraday and short-term trading.

This script stands out thanks to its **Opposite Double Cross detection**, **Multi-Timeframe support**, and especially the **customizable independent Buy/Sell filters**, giving traders better control compared to fixed-level versions.

The indicator is open-source and shared for educational purposes only. It is not financial advice. Always backtest thoroughly and use proper risk management.

Feedback is welcome!

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน