# FRAMA

FRAMA is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

John Ehlers' fractal adaptive moving average: the smoothing factor is re-derived each bar from a box-counting fractal dimension of the last 16 bars' highs and lows, so the line stiffens in noise and accelerates in trends. Regime coloring against an ATR-normalized flat threshold and a dashboard with the live dimension, alpha and EMA-equivalent length complete the build.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jun 7, 2026.
- Access: free.
- Concepts: [FRAMA](https://www.luxalgo.com/library/concept/frama/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=vrf607m1cavsb0jmns8bal80
- Page: https://www.luxalgo.com/library/indicator/frama/

**FRAMA** plots John Ehlers' fractal adaptive moving average: an exponential smoother whose alpha is reset bar by bar by how rough (how fractal) the recent price path is, so one line acts slow in congestion and fast in trends. This build follows the published recipe of [FRAMA](https://www.luxalgo.com/library/concept/frama/) (the dimension from a two-half box-counting comparison of highs and lows, alpha = exp(−4.6 × (D − 1)) clamped to 0.01–1) and adds an ATR-normalized slope read that splits the tape into bullish, bearish and flat phases.

## How to Trade the FRAMA?

- **Line color** (with Trend Regime Coloring on): bullish above the Flat Threshold, bearish below its negative, flat in congestion. Each phase transition is alertable.
- **Price crossings**: crossings of the Source (the bar midpoint by default) through the line carry more weight when the fractal dimension is low; optional triangles and alerts cover both directions.
- **Gradient intensity**: with Adaptive Gradient on, the line pales as the dimension rises toward 2 (noise) and saturates toward 1 (clean trend).

## FRAMA Settings

- **Source** (default hl2): the published filter smooths the bar midpoint; the dimension is always measured from highs and lows.
- **Window Length** (default 16): even lookback split into two halves for the dimension estimate; odd values round down. Longer windows steady the estimate but notice regime change later.
- **Flat Threshold** (default 0.05): one-bar slope, as a fraction of ATR, below which the line reads flat; raise it to demand steeper trends.
- **ATR Normalization Length** (default 14): ATR window that keeps the threshold consistent across symbols and timeframes.
- **Show Dashboard** (default enabled; Location Top Right, Size Small): regime, fractal dimension, effective alpha and its EMA-equivalent length.
- Style: **Trend Regime Coloring** (on), **Adaptive Gradient** (on), **Price / FRAMA Gradient Fill** (on), **Price Crossing Markers** (off), **Line Width** (2).

## Frequently Asked Questions

### How does FRAMA differ from VIDYA?

Both vary an EMA's speed with conditions, but [VIDYA](https://www.luxalgo.com/library/indicator/vidya/) scales alpha from a momentum-based efficiency reading while FRAMA derives it from the fractal dimension of the price path itself. FRAMA's exponential map produces sharper transitions between stalled and fast behavior.

### What does the fractal dimension measure?

How completely price filled its recent range: near 1 the path is line-like (trending), near 2 space-filling (noise). The dashboard shows the live value with the alpha and EMA-equivalent length it implies.

### Which window length should I use?

The 16-bar default is the published setting, and the scale-free dimension keeps it consistent across timeframes. Lengthen it for steadier readings on noisy charts rather than retuning per market.

## Related indicators

- [Trend Regularity Adaptive Moving Average](https://www.luxalgo.com/library/indicator/trend-regularity-adaptive-moving-average/) (TRAMA): markdown at https://www.luxalgo.com/library/indicator/trend-regularity-adaptive-moving-average.md
- [Machine Learning Moving Average](https://www.luxalgo.com/library/indicator/machine-learning-moving-average/) (Adaptive-lookback MA): markdown at https://www.luxalgo.com/library/indicator/machine-learning-moving-average.md
- [ZLEMA](https://www.luxalgo.com/library/indicator/zlema/) (Trend): markdown at https://www.luxalgo.com/library/indicator/zlema.md
- [Moving Average Converging](https://www.luxalgo.com/library/indicator/moving-average-converging/) (EMA): markdown at https://www.luxalgo.com/library/indicator/moving-average-converging.md
- [MLMA](https://www.luxalgo.com/library/indicator/mlma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/mlma.md
- [Volume-adjusted MA](https://www.luxalgo.com/library/indicator/volume-adjusted-ma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/volume-adjusted-ma.md
- [JMA](https://www.luxalgo.com/library/indicator/jma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/jma.md
- [T3](https://www.luxalgo.com/library/indicator/t3/) (Trend): markdown at https://www.luxalgo.com/library/indicator/t3.md

---

Source: https://www.luxalgo.com/library/indicator/frama/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
