OPEN-SOURCE SCRIPT

MACD RSI Momentum Confluence[XWiseTrade]

493
MACD RSI Momentum Confluence

This indicator generates Bull/Bear signals only when a MACD signal-line cross is confirmed by two independent momentum conditions, rather than firing on the cross alone. The goal is to reduce the false crosses that a plain MACD+RSI combination produces in ranging markets.
Why these components are combined

A MACD cross marks a potential shift in momentum, but on its own it triggers frequently during choppy, directionless price action. RSI relative to its midline is a common trend filter, but a value sitting just above or below 50 says little about whether momentum is actually building. Used separately, each gives signals the other would reject. This script requires them to agree and to be accelerating in the same direction.
How the components work together

A signal requires three conditions to align on the same bar:

  1. Trigger — MACD line crosses its signal line (up for Bull, down for Bear).
  2. Momentum confirmation — the MACD histogram is expanding in the cross direction, so flat or contracting crosses (typical of chop) are filtered out.
  3. Direction confirmation — RSI is on the correct side of its midline and moving toward the signal direction over a configurable lookback, not merely resting there.


A cooldown prevents clustered repeat signals after a trigger.
How to use it

Add it to any chart and timeframe. "Bull Cross" / "Bear Cross" labels mark confirmed signals; alerts are available for both. The histogram-expansion filter and RSI slope lookback are adjustable, letting you tighten the filter on lower timeframes or loosen it on higher ones. These are descriptive signals for discretionary use, not buy/sell recommendations.

Inputs: RSI length & midline, RSI slope lookback, MACD fast/slow/signal, histogram-expansion toggle, signal cooldown.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.