Trade The Matric / MACD-RSI Hybrid Candles**"MACD-RSI Hybrid Candles"** is a **custom TradingView Pine Script (v6)** indicator that **replaces your chart’s default candles** with **dynamically colored, intensity-adjusted candles** based on **combined MACD and RSI signals**.
It’s a **visual fusion** of:
- **MACD Histogram** → Momentum & Trend Strength
- **RSI** → Overbought/Oversold & Trend Confirmation
- **Dynamic Transparency** → Visualizes **signal strength**
The result? **At-a-glance confirmation of bullish/bearish phases** — no need to check subcharts.
---
## OVERVIEW: What This Indicator Does
| Feature | Purpose |
|-------|--------|
| **Replaces price candles** | Entire chart becomes a **live MACD-RSI signal map** |
| **Colors based on dual confirmation** | Only strong when **both** MACD and RSI agree |
| **Transparency = momentum intensity** | Brighter = stronger signal |
| **Labels & Alerts** | Highlights **phase changes** (bullish/bearish shifts) |
---
## USER INPUTS (Customizable)
| Input | Default | Description |
|------|--------|-----------|
| `fastLen` | 12 | MACD Fast EMA |
| `slowLen` | 26 | MACD Slow EMA |
| `signalLen` | 9 | MACD Signal Line |
| `rsiLen` | 14 | RSI Period |
| `showLabels` | true | Show "Bullish Phase" / "Bearish Phase" labels |
> Standard settings — tweak for sensitivity.
---
## CORE CALCULATIONS
### 1. **MACD**
```pinescript
macdLine = ta.ema(close, fastLen) - ta.ema(close, slowLen)
signalLine = ta.ema(macdLine, signalLen)
hist = macdLine - signalLine
```
- `hist > 0` → **Bullish momentum**
- `hist < 0` → **Bearish momentum**
### 2. **RSI**
```pinescript
rsi = ta.rsi(close, rsiLen)
```
- `rsi > 50` → **Bullish bias**
- `rsi < 50` → **Bearish bias**
---
## DUAL CONFIRMATION LOGIC
| Condition | Meaning |
|--------|--------|
| `bullCond = macdBull and rsiBull` | **MACD hist > 0** AND **RSI > 50** → **Confirmed Bullish** |
| `bearCond = macdBear and rsiBear` | **MACD hist < 0** AND **RSI < 50** → **Confirmed Bearish** |
| Otherwise | **Neutral / Conflicted** |
> Only **strong, aligned signals** get bright colors.
---
## DYNAMIC INTENSITY & TRANSPARENCY (Key Feature)
```pinescript
maxHist = ta.highest(math.abs(hist), 100)
intensity = math.abs(hist) / maxHist
transp = 90 - (intensity * 80)
```
### How It Works:
1. Finds **strongest MACD histogram value** in last 100 bars
2. Compares **current histogram** to that peak → `intensity` (0 to 1)
3. **Transparency scales from 90 (faint) → 10 (bright)**
| Intensity | Transparency | Visual Effect |
|---------|--------------|-------------|
| 0% (weak) | 90 | Almost transparent |
| 50% | 50 | Medium |
| 100% | 10 | **Vivid, bold candle** |
> **Brighter candle = stronger momentum relative to recent history**
---
## CANDLE COLOR LOGIC
| Condition | Candle & Wick Color | Transparency |
|--------|---------------------|------------|
| **Confirmed Bullish** (`bullCond`) | **Lime Green** | Dynamic (10–90) |
| **Confirmed Bearish** (`bearCond`) | **Red** | Dynamic (10–90) |
| **Neutral / Conflicted** | **Gray** | Fixed 80 (faint) |
> **Wicks and borders match body** → full candle takeover
---
## VISUAL OUTPUT
### 1. **Custom Candles**
```pinescript
plotcandle(open, high, low, close, color=barColor, wickcolor=barColor, bordercolor=barColor)
```
- **Replaces default chart candles**
- **No original candles visible**
### 2. **Labels (Optional)**
- **"Bullish Phase"** → Green label **below low** when:
- MACD histogram **crosses above zero**
- AND RSI **> 50**
- **"Bearish Phase"** → Red label **above high** when:
- MACD histogram **crosses below zero**
- AND RSI **< 50**
> Up to **500 labels** (`max_labels_count=500`)
---
## ALERTS (Built-In)
| Alert | Trigger |
|------|--------|
| **Bullish MACD-RSI Signal** | `ta.crossover(hist, 0) and rsi > 50` |
| **Bearish MACD-RSI Signal** | `ta.crossunder(hist, 0) and rsi < 50` |
> Message: *"MACD crossed above zero with RSI > 50 — Bullish phase."*
---
## HOW TO READ THE CHART
| Visual | Market State | Interpretation |
|-------|-------------|----------------|
| **Bright Lime Candles** | **Strong Bullish Momentum** | High conviction — trend accelerating |
| **Faint Lime Candles** | **Weak Bullish** | Momentum present but not strong |
| **Bright Red Candles** | **Strong Bearish Momentum** | Downtrend with power |
| **Faint Red Candles** | **Weak Bearish** | Selling pressure, but fading |
| **Gray Candles** | **Conflicted / Choppy** | MACD and RSI disagree — avoid |
| **"Bullish Phase" Label** | **New Uptrend Starting** | Entry signal |
| **"Bearish Phase" Label** | **New Downtrend Starting** | Short signal |
---
## TRADING STRATEGY (Example)
### **Long Entry**
1. Wait for **"Bullish Phase" label**
2. Confirm **bright lime candles** (intensity > 50%)
3. Enter on **pullback to support** or **breakout**
4. **Stop Loss**: Below recent swing low
5. **Take Profit**: Trail with EMA or at resistance
### **Short Entry**
1. Wait for **"Bearish Phase" label**
2. Confirm **bright red candles**
3. Enter on **rally to resistance**
> **Best in trending markets** — avoid choppy ranges.
---
## UNIQUE FEATURES
| Feature | Benefit |
|-------|--------|
| **Dual Confirmation** | Avoids false MACD signals in overbought/oversold zones |
| **Dynamic Transparency** | Shows **relative strength** — not just direction |
| **Full Candle Replacement** | Clean, uncluttered chart |
| **Phase Labels** | Marks **exact trend change points** |
| **Built-in Alerts** | No extra setup needed |
---
## LIMITATIONS
| Issue | Note |
|------|------|
| **Lagging by design** | MACD & RSI are reactive |
| **Repainting?** | **No** — all on close |
| **No volume filter** | Add separately for better accuracy |
| **Labels can clutter** | Toggle off in choppy markets |
| **Intensity uses 100-bar lookback** | May lag in very long trends |
---
## BEST USE CASES
| Market | Timeframe | Style |
|-------|----------|------|
| Stocks, Forex, Crypto | 15m, 1H, 4H | Swing / Trend Following |
| **Avoid**: Sideways markets | Yes | High noise = many gray candles |
---
## COMPARISON TO STANDARD MACD/RSI
| Feature | This Indicator | Standard MACD + RSI |
|-------|----------------|---------------------|
| Visual | **Candles = signal** | Subchart lines |
| Confirmation | Built-in dual logic | Manual |
| Strength | Dynamic brightness | Histogram height |
| Alerts | Phase changes | Need custom |
| Chart Clutter | Low | High (two panels) |
> **This is a "one-panel" momentum dashboard**
---
## SUMMARY: What This Indicator Does
> **"MACD-RSI Hybrid Candles"** turns your **entire price chart into a live momentum heatmap** where:
>
> 1. **Candle color** = **MACD + RSI agreement** (Bullish / Bearish / Neutral)
> 2. **Brightness** = **Momentum strength** vs. recent 100 bars
> 3. **Labels & Alerts** = **Trend phase changes** (zero-line crosses with RSI filter)
>
> It **eliminates subcharts** and gives **instant visual confirmation** of:
> - **Trend direction**
> - **Momentum power**
> - **High-probability entries**
---
**Ideal for traders who want:**
- **No indicator panels**
- **Clear, color-coded signals**
- **Strength at a glance**
- **Automated alerts on trend shifts**
---
**Pro Tip**: Use with **volume** or **support/resistance** for **higher win rate**.
Macdstrategy
MACD Sniper [trade_lexx]📈 MACD Sniper — Improve your trading strategy with accurate signals!
Introducing the MACD Sniper , an advanced trading indicator designed for a comprehensive analysis of market conditions. This indicator combines MACD (Moving Average Convergence Divergence) with various types of moving averages (SMA, EMA, WMA, VWMA, KAMA, HMA, ZLEMA, TEMA, ALMA, DEMA), providing traders with a powerful tool for generating buy and sell signals. It is ideal for traders who need an advantage in detecting changes in trends and market conditions.
🔍 How the signals work
1. Histogram signals:
— A buy signal is generated when the MACD histogram is below zero and begins to grow after the minimum number of falling histogram columns, which are indicated in the indicator menu. This indicates that selling pressure has decreased, the market is oversold and ready for a rebound. The signals are displayed as green triangles labeled "H" under the histogram graph. On the main chart, buy signals are displayed as green triangles labeled "Buy" under candlesticks.
— A sell signal is generated when the MACD histogram is above zero and begins to fall after the minimum number of growing histogram columns, which are indicated in the indicator menu. This indicates that the buying pressure has decreased, the market is overbought and ready for correction. The signals are displayed as red triangles labeled "H" above the histogram graph. On the main chart, the sell signals are displayed as red triangles with the word "Sell" above the candlesticks.
2. Moving Average Crossing Signals (MA):
— A buy signal is generated when the Fast Moving Average (MACD) crosses the Slow Moving Average (Signal Line) from bottom to top. This indicates a possible upward reversal of the market. The signals are displayed as green triangles labeled "MA" under the MACD chart. On the main chart, buy signals are displayed as green triangles labeled "Buy" under candlesticks.
— A sell signal is generated when the Fast Moving Average (MACD) crosses the slow Moving Average (Signal Line) from top to bottom. This indicates a possible downward reversal of the market. The signals are displayed as red triangles labeled "MA" above the MACD chart. On the main chart, the sell signals are displayed as red triangles with the word "Sell" above the candlesticks.
🔧 Signal filtering
— Minimum number of bars between signals
This filter allows the user to set the minimum number of bars that must pass between the generation of two consecutive signals. This helps to avoid frequent false alarms and improves the quality of the generated signals. Setting this parameter allows you to filter out the noise in the market and make the signals more reliable. For example, if the value is set to 5, then a new signal will be generated only after 5 bars have passed since the previous signal.
— "Wait for the opposite signal" mode
In this mode, Buy and Sell signals are generated only after receiving the opposite signal. This means that a buy signal will be generated only after the previous sell signal, and vice versa. This approach adds an additional level of filtering and helps to avoid false positives. This is especially useful in conditions of high market volatility, when false signals often occur.
— RSI filter
The Relative Strength Index (RSI) is used for additional filtering of buy and sell signals. The RSI helps determine whether a market is overbought or oversold. The user can set overbought and oversold levels, and signals will be generated only when the RSI is in the specified ranges. For example, a buy signal will be generated only if the RSI is in the range between 10 and 30 (oversold), and a sell signal if the RSI is in the range between 70 and 90 (overbought). This helps to avoid false signals in extreme market conditions.
🔌 Connector Histogram, MA, Combined 🔌
These parameters allow you to connect the indicator to trading strategies and test the signals throughout the trading history. This makes the indicator an even more powerful tool for traders who want to test the effectiveness of their strategies on historical data.
Connector Histogram provides the ability to connect signals based on the MACD histogram to trading strategies.
Connector MA allows you to connect signals based on the intersection of moving averages (MA) of the MACD, which can also be used for automatic trading or strategy testing.
The combined connector combines signals based on both a histogram and the intersection of moving averages, making the analysis more comprehensive and reliable, which is especially useful for traders seeking to improve the quality of their trading decisions.
🔔 Alerts
The indicator provides the ability to set up notifications for buy and sell signals, which allows traders to keep abreast of important market events without having to constantly monitor the chart. Users can set up notifications that will alert them when buy or sell signals appear, helping them respond to market changes in a timely manner and make informed decisions. These notifications can be configured for various types of signals, such as signals based on the MACD histogram, moving average crossings, or all at once, which makes the indicator a more convenient and functional tool for active traders.
🎨 Customizable Appearance
Customize the appearance of the MACD Sniper according to your preferences to make the analysis more convenient and visually pleasing. In the indicator settings section, you can change the colors of the buy and sell signals so that they stand out on the chart and are easily visible. For example, buy signals can be green, and sell signals can be red. These settings allow traders to adapt the indicator to their individual needs, making it more flexible and user-friendly.
🔧 How it works
The MACD Sniper indicator starts by calculating the MACD values and moving averages for a specific period in order to assess market conditions. For this, fast and slow moving averages are used, as well as a signal line, which are calculated based on the set parameters. The indicator then analyzes the MACD histogram to determine whether the difference between the fast and slow moving averages is rising or falling. Based on this analysis, buy and sell signals are generated. Additionally, the indicator uses the RSI filter to filter out false signals in overbought or oversold market conditions. The user can set the minimum number of bars between the signals and the "Wait for the opposite signal" mode for additional filtering. The indicator dynamically adjusts to changes in the market, providing relevant signals in real time.
📚 Quick guide to using the MACD Sniper
— Add the indicator to your favorites by clicking on the rocket icon. Adjust the parameters such as the length of periods for fast and slow moving averages, the type of moving average (SMA, EMA, WMA, VWMA, KAMA, HMA, ZLEMA, TEMA, ALMA, DEMA) and the length of the signal line, according to your trading style, or leave all settings as default.
— Adjust the signal filters to improve their quality and avoid false alarms
— Turn on notifications so that you don't miss important trading opportunities and don't constantly sit at the chart. This will allow you to keep abreast of all key market events and respond to them in a timely manner, without being distracted from other business.
— Use signals, they will help you determine the optimal entry and exit points of positions.
— Use the Connector for deeper analysis and verification of the effectiveness of signals, connect them to your trading strategies. This will allow you to test signals throughout your trading history and evaluate their accuracy based on historical data.
— Include the indicator in your trading strategy and run testing to see how buy and sell signals have worked in the past.
— Analyze the test results to determine how reliable the signals are and how they can improve your trading strategy. This will help you make more informed decisions and increase your trading efficiency.

