OPEN-SOURCE SCRIPT
Dual MA Gradient [Gabremoku]

Dual MA Gradient [Gabremoku] is a clean dual moving average overlay designed to highlight not only MA direction and crossover, but also the degree of separation between the two averages through a dynamic gradient ribbon.
The script uses two configurable moving averages and transforms their relationship into a visual ribbon that reacts to:
bullish alignment
bearish alignment
neutral compression
Instead of relying only on a simple crossover, the indicator helps show whether the two averages are:
crossing,
compressing,
or expanding apart
That makes it useful as a compact trend-structure tool for traders who want an at-a-glance read on direction and relative momentum.
What it shows
📈 Two configurable moving averages — each MA can be set independently using:
EMA or SMA
custom length
custom source
🌈 Directional gradient ribbon — the space between the two averages is divided into layered fills that create a smooth visual ribbon.
🟦 Bullish separation — when the fast MA is above the slow MA, the ribbon shifts to bullish color.
🟨 Bearish separation — when the fast MA is below the slow MA, the ribbon shifts to bearish color.
⚪ Compression state — when the spread between the two MAs becomes small enough, the ribbon fades into a neutral state to signal contraction.
🏷️ Status label — optional live label shows the active state:
Compression
Bullish Separation
Bearish Separation
⭕ Cross markers — optional markers can be shown when bullish or bearish MA crosses occur.
Core logic
The indicator is built around three simple but useful ideas:
Which MA is on top
How far apart the two MAs are
Whether the spread is strong enough to be directional or too tight and neutral
A moving average crossover occurs when a shorter-period average crosses a longer-period average, and it is commonly used to identify trend shifts or signal changes in directional bias.
This script goes a step further by emphasizing the spread between the averages. That matters because ribbon spacing is often used as a visual clue for trend structure: when averages are compressed, the market may be in transition or contraction, while a wider directional ribbon can reflect stronger alignment.
How to read it
A practical reading method is:
Compression = the two averages are close together, market may be transitioning or losing directional clarity
Bullish separation = the fast MA is above the slow MA and the ribbon is opening upward
Bearish separation = the fast MA is below the slow MA and the ribbon is opening downward
In many moving-average frameworks:
the cross helps identify the directional shift
the spacing helps evaluate whether that shift is weak or established
a tight ribbon often suggests indecision or a developing transition
Features
✅ Dual moving average framework
✅ SMA or EMA selection for both lines
✅ Fully customizable lengths
✅ Dynamic layered ribbon between MAs
✅ Bullish / bearish / neutral compression states
✅ Optional MA line display
✅ Optional live status label
✅ Optional crossover markers
✅ Built-in bullish and bearish crossover alerts
Notes
This indicator is designed as a trend-visualization tool rather than a complete standalone strategy. Like all moving-average systems, it is inherently lagging, so it is generally more useful for confirming structure and directional bias than for predicting reversals in isolation.
Author: Gabremoku
Pine Script v6
The script uses two configurable moving averages and transforms their relationship into a visual ribbon that reacts to:
bullish alignment
bearish alignment
neutral compression
Instead of relying only on a simple crossover, the indicator helps show whether the two averages are:
crossing,
compressing,
or expanding apart
That makes it useful as a compact trend-structure tool for traders who want an at-a-glance read on direction and relative momentum.
What it shows
📈 Two configurable moving averages — each MA can be set independently using:
EMA or SMA
custom length
custom source
🌈 Directional gradient ribbon — the space between the two averages is divided into layered fills that create a smooth visual ribbon.
🟦 Bullish separation — when the fast MA is above the slow MA, the ribbon shifts to bullish color.
🟨 Bearish separation — when the fast MA is below the slow MA, the ribbon shifts to bearish color.
⚪ Compression state — when the spread between the two MAs becomes small enough, the ribbon fades into a neutral state to signal contraction.
🏷️ Status label — optional live label shows the active state:
Compression
Bullish Separation
Bearish Separation
⭕ Cross markers — optional markers can be shown when bullish or bearish MA crosses occur.
Core logic
The indicator is built around three simple but useful ideas:
Which MA is on top
How far apart the two MAs are
Whether the spread is strong enough to be directional or too tight and neutral
A moving average crossover occurs when a shorter-period average crosses a longer-period average, and it is commonly used to identify trend shifts or signal changes in directional bias.
This script goes a step further by emphasizing the spread between the averages. That matters because ribbon spacing is often used as a visual clue for trend structure: when averages are compressed, the market may be in transition or contraction, while a wider directional ribbon can reflect stronger alignment.
How to read it
A practical reading method is:
Compression = the two averages are close together, market may be transitioning or losing directional clarity
Bullish separation = the fast MA is above the slow MA and the ribbon is opening upward
Bearish separation = the fast MA is below the slow MA and the ribbon is opening downward
In many moving-average frameworks:
the cross helps identify the directional shift
the spacing helps evaluate whether that shift is weak or established
a tight ribbon often suggests indecision or a developing transition
Features
✅ Dual moving average framework
✅ SMA or EMA selection for both lines
✅ Fully customizable lengths
✅ Dynamic layered ribbon between MAs
✅ Bullish / bearish / neutral compression states
✅ Optional MA line display
✅ Optional live status label
✅ Optional crossover markers
✅ Built-in bullish and bearish crossover alerts
Notes
This indicator is designed as a trend-visualization tool rather than a complete standalone strategy. Like all moving-average systems, it is inherently lagging, so it is generally more useful for confirming structure and directional bias than for predicting reversals in isolation.
Author: Gabremoku
Pine Script v6
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.