OPEN-SOURCE SCRIPT
MACD RSI Momentum Confluence[XWiseTrade]

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:
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.
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:
- Trigger — MACD line crosses its signal line (up for Bull, down for Bear).
- Momentum confirmation — the MACD histogram is expanding in the cross direction, so flat or contracting crosses (typical of chop) are filtered out.
- 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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Free tools & education → xwisetrade.com | Community → discord.gg/BUVfRjey2u
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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Free tools & education → xwisetrade.com | Community → discord.gg/BUVfRjey2u
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.