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
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.