OPEN-SOURCE SCRIPT
3MA Alignment Ribbon [AlgoTraderPro]

3MA Alignment Ribbon [CSJ9] is a clean, visual trend-structure indicator based on the alignment of three moving averages.
Instead of focusing on crossovers, it highlights trend quality and direction by dynamically coloring the moving averages and the ribbon between them.
The goal is simple: See at a glance whether the market structure is bullish, bearish, or neutral.
⸻
How It Works
The indicator plots three moving averages (Fast, Medium, Slow) and evaluates their alignment:
The moving averages and the filled ribbon between them are automatically colored based on this alignment, making trend conditions immediately visible.
⸻
Key Features
✅Multi-MA Support
Choose between:
✅ Alignment Modes
✅ Optional Slope Filter
Filter signals by requiring the slow MA to be rising or falling, helping avoid false trend states during flat conditions.
✅ Higher Timeframe (HTF) Ribbon
Overlay the same 3MA alignment logic from a higher timeframe on your current chart:
✅ Alerts & Visual Signals
✅ Custom Styling
⸻
How to Use It
This indicator works best as:
It does not generate buy/sell signals by itself — instead, it helps you trade aligned with market structure.
⸻
Default Settings
The default lengths (50 / 100 / 200 EMA) are suitable for most markets and timeframes, including crypto, forex, indices, and equities.
Instead of focusing on crossovers, it highlights trend quality and direction by dynamically coloring the moving averages and the ribbon between them.
The goal is simple: See at a glance whether the market structure is bullish, bearish, or neutral.
⸻
How It Works
The indicator plots three moving averages (Fast, Medium, Slow) and evaluates their alignment:
- Bullish → Fast > Medium > Slow
- Bearish → Fast < Medium < Slow
- Neutral → Any other configuration
The moving averages and the filled ribbon between them are automatically colored based on this alignment, making trend conditions immediately visible.
⸻
Key Features
✅Multi-MA Support
Choose between:
- EMA (default)
- SMA
- WMA
- VWMA
- RMA
- HMA
✅ Alignment Modes
- Strict: classic Fast > Medium > Slow logic
- Tolerant: requires a minimum percentage separation between averages to reduce noise in ranging markets
✅ Optional Slope Filter
Filter signals by requiring the slow MA to be rising or falling, helping avoid false trend states during flat conditions.
✅ Higher Timeframe (HTF) Ribbon
Overlay the same 3MA alignment logic from a higher timeframe on your current chart:
- Fully optional
- Correctly calculated on the HTF itself
- Option to use confirmed HTF bars only (reduces repaint confusion)
✅ Alerts & Visual Signals
- Alerts when alignment turns Bullish, Bearish, or Neutral
- Optional on-chart markers when the alignment flips
✅ Custom Styling
- Fully customizable colors and transparency
- Designed to remain readable without cluttering the chart
⸻
How to Use It
This indicator works best as:
- A trend filter for discretionary trading
- A context tool for entries using other setups
- A market structure overlay for scalping, swing trading, or position trading
It does not generate buy/sell signals by itself — instead, it helps you trade aligned with market structure.
⸻
Default Settings
The default lengths (50 / 100 / 200 EMA) are suitable for most markets and timeframes, including crypto, forex, indices, and equities.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Code. Structure. Execution.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Code. Structure. Execution.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.