OPEN-SOURCE SCRIPT
Updated

ALMA & EMA Ribbon by zdmre

220
This indicator combines a unique trend-following signal with a classic EMA ribbon to provide a clear view of the market trend.

The main signal line is not based on a typical ATR. Instead, it uses an Arnaud Legoux Moving Average (ALMA) as its baseline and calculates support/resistance bands using Standard Deviation. This creates a responsive trend line that adapts well to volatility. This is paired with a simple EMA Ribbon to help confirm momentum.

What It Does
ALMA + SD Trend Line: This is the core of the indicator. It uses an ALMA as the baseline (instead of a simple MA) and Standard Deviation for the bands. This tends to be more responsive than many traditional trend-following indicators.

Buy/Sell Signals: Simple "B" and "S" labels appear on your chart when the trend is calculated to have changed direction.

EMA Ribbon: A standard Fast/Slow EMA ribbon is plotted to give you a secondary confirmation of momentum. The fill between the EMAs changes color (green for bull, red for bear).

On-Screen Dashboard: A clean info panel in the corner shows you the current status of all components at a glance:

Current Signal (Long/Short)
Price vs. Trend Line (Above/Below)
Trend Strength (%)
EMA Trend (Bullish/Bearish)
Momentum

Fully Customizable: You can toggle every visual element on or off (the signals, the ribbon, the bar coloring, the dashboard) to keep your chart clean.

Settings
Trend Settings:
Factor: This is the main setting. It's the Standard Deviation multiplier. A higher value makes the line less sensitive (fewer signals). A lower value makes it more sensitive (more signals).
SD Length: The lookback for the Standard Deviation.

ALMA Settings:
ALMA Length, Sigma, Offset: Standard controls for the ALMA's smoothness and responsiveness.

EMA Ribbon:
Fast EMA & Slow EMA: Set the lengths for your ribbon.

Visual Settings:
Checkboxes to toggle all visual components (signals, ribbon, dashboard, etc.).


You can set up alerts in TradingView for the following events:
🟢 Long Signal: Triggers on a new "B" (Buy) signal.
🔴 Short Signal: Triggers on a new "S" (Sell) signal.
⚠️ Price Crossed Trend: Triggers any time the price closes across the main trend line.

#DYOR
Release Notes
Minor fixes.

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.