OPEN-SOURCE SCRIPT
MACD-V with RSI Gradient

## Overview
MACD-V is a volatility-adjusted momentum indicator that normalizes MACD using ATR. This version adds a dynamic RSI-based background gradient to highlight momentum zones visually.
## Features
- **MACD-V Line**: EMA-based momentum normalized by ATR
- **Signal Line**: EMA of MACD-V
- **Histogram**: Color-coded based on slope and polarity
- **RSI Gradient Background**: Shading from bright green (RSI > 75) to bright red (RSI < 30), with intermediate tones for momentum context
## Use Case
Designed for 30-minute oil futures charts, this indicator helps identify:
- Trend strength and reversals
- Momentum zones using RSI shading
- Pullback opportunities and exhaustion zones
## Inputs
- Fast EMA (default: 12)
- Slow EMA (default: 26)
- Signal EMA (default: 9)
- ATR Length (default: 26)
## Notes
- RSI shading is purely visual—no alerts are wired in yet
- Histogram renders behind MACD-V and Signal lines for clarity
- Colors are tuned for dark charts
## Credits
The MACD-v is an indicator created in 2015 by Alex Spiroglou
and presented to the public in 2022
as a paper called: "𝗠𝗔𝗖𝗗-𝘃: 𝗩𝗼𝗹𝗮𝘁𝗶𝗹𝗶𝘁𝘆 𝗡𝗼𝗿𝗺𝗮𝗹𝗶𝘀𝗲𝗱 𝗠𝗼𝗺𝗲𝗻𝘁𝘂𝗺"
It received the following Awards:
1. “𝐅𝐨𝐮𝐧𝐝𝐞𝐫𝐬 𝐀𝐰𝐚𝐫𝐝” (2022),
for advances in Active Investment Management
from the National Association of Active Investment Managers (NAAIM)
2. “𝐂𝐡𝐚𝐫𝐥𝐞𝐬 𝐇. 𝐃𝐨𝐰 𝐀𝐰𝐚𝐫𝐝” (2022)
for outstanding research in Technical Analysis,
from the Chartered Market Technicians Association (CMTA)
The RSI Gradient was my idea, but quite frankly, if I go looking around I suppose I'll find that others had the same idea.
This is the first time I've ever published any code, so if I stepped on anyone's toes. I'm sorry.
MACD-V is a volatility-adjusted momentum indicator that normalizes MACD using ATR. This version adds a dynamic RSI-based background gradient to highlight momentum zones visually.
## Features
- **MACD-V Line**: EMA-based momentum normalized by ATR
- **Signal Line**: EMA of MACD-V
- **Histogram**: Color-coded based on slope and polarity
- **RSI Gradient Background**: Shading from bright green (RSI > 75) to bright red (RSI < 30), with intermediate tones for momentum context
## Use Case
Designed for 30-minute oil futures charts, this indicator helps identify:
- Trend strength and reversals
- Momentum zones using RSI shading
- Pullback opportunities and exhaustion zones
## Inputs
- Fast EMA (default: 12)
- Slow EMA (default: 26)
- Signal EMA (default: 9)
- ATR Length (default: 26)
## Notes
- RSI shading is purely visual—no alerts are wired in yet
- Histogram renders behind MACD-V and Signal lines for clarity
- Colors are tuned for dark charts
## Credits
The MACD-v is an indicator created in 2015 by Alex Spiroglou
and presented to the public in 2022
as a paper called: "𝗠𝗔𝗖𝗗-𝘃: 𝗩𝗼𝗹𝗮𝘁𝗶𝗹𝗶𝘁𝘆 𝗡𝗼𝗿𝗺𝗮𝗹𝗶𝘀𝗲𝗱 𝗠𝗼𝗺𝗲𝗻𝘁𝘂𝗺"
It received the following Awards:
1. “𝐅𝐨𝐮𝐧𝐝𝐞𝐫𝐬 𝐀𝐰𝐚𝐫𝐝” (2022),
for advances in Active Investment Management
from the National Association of Active Investment Managers (NAAIM)
2. “𝐂𝐡𝐚𝐫𝐥𝐞𝐬 𝐇. 𝐃𝐨𝐰 𝐀𝐰𝐚𝐫𝐝” (2022)
for outstanding research in Technical Analysis,
from the Chartered Market Technicians Association (CMTA)
The RSI Gradient was my idea, but quite frankly, if I go looking around I suppose I'll find that others had the same idea.
This is the first time I've ever published any code, so if I stepped on anyone's toes. I'm sorry.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.