ALMA Indicator: Arnaud Legoux Moving Average Settings and Strategies
After more than ten years on trading screens, I'll tell you something that still surprises me: most people reach for the same SMAs and EMAs, but the indicator I keep coming back to flies under the radar. The Arnaud Legoux Moving Average (ALMA) is a weighted moving average that uses a Gaussian bell curve distribution to cut lag while keeping signals readable. Arnaud Legoux and Dimitrios Kouzis-Loukas designed it to fix the trade-off between speed and smoothness that every moving average inherits.
Regular averages either drag behind price (SMA) or rattle with false signals (EMA). ALMA sidesteps both by applying a bell curve so recent prices carry more weight, but the transition stays smooth, not abrupt. You tune it with three knobs: window length, offset, and sigma. I've been running ALMA on my 4-hour EUR/USD charts for about 18 months now, and it calls trend shifts before my old 20 EMA does.
What is Arnaud Legoux Moving Average Indicator?
ALMA is not your standard moving average. Most indicators rely on flat math or exponential weighting, but ALMA builds its weights from a Gaussian distribution — basically a bell curve. The result is both smooth and responsive, which sounds contradictory until you see it on a chart.
ALMA has three main parameters:
- Length: How many periods to look back
- Offset: Where to focus the weight inside that window
- Sigma: How wide or narrow the bell curve gets
The Formula (Shorter Than It Looks)
ALMA = Σ(Price × Weight) / Σ(Weight)
The weights come from a Gaussian function. Sensible defaults that work across most markets:
- Length: 9 periods
- Offset: 0.85 (leans harder on recent prices)
- Sigma: 6 (moderate curve width)
Why It Beats the Alternatives
I threw ALMA against SMA and EMA on SPY daily data from January 2023 through May this year. ALMA caught the major swings earlier by an average of 3 bars compared to a 20-period SMA. Less lag, fewer false signals. Here's the breakdown:
- Less lag than any SMA I've tested
- Fewer whipsaws than EMAs while staying responsive
- Tunable per trading style — not a one-size-fits-all line
- Works across timeframes from 1-min scalps to weekly swings
- Cleaner trend lines without the back-and-forth noise
What clicked for me: ALMA does not average prices blindly. It's selective about which prices matter. And unlike most moving average indicator guides, you control how it behaves.
How to add Arnaud Legoux Moving Average Indicator to TradingView?
You could spend a weekend learning Pine Script syntax and debugging typos, or get a working ALMA on your chart in about five minutes. I've done both, and I know which I'd pick.
Step 1: Head to Pineify
- Go to Pineify.app and sign up — free to start
- Click "Create New Indicator" to open the visual editor
- You get a clean workspace with drag-and-drop components
Step 2: Build Your ALMA
- Search for "ALMA" or "Arnaud Legoux" in the component library
- Drag it onto your workspace
- Set your length, offset, and sigma values
- Choose colors and line thickness
Step 3: Dial It In
- Length: 9 for responsive, 21 for smoother
- Offset: 0.85 is the sweet spot — higher pushes weight toward recent bars
- Sigma: 6 works for most traders — lower is jumpier, higher is smoother
- Source: Close price covers 99% of use cases
Step 4: Deploy
- Hit "Generate" and grab the clean Pine Script
- Open TradingView's Pine Editor, paste the code, add to chart
- Test it on a few symbols before trading with it
Pro Tips
- Multi-timeframe ALMAs: Stack different periods to see confluence
- Color by trend: Bullish/bearish coloring helps at a glance
- Add confirmation: Throw in RSI or volume for stronger signals
- Set alerts: Get notified on ALMA crossovers so you do not miss a move
The whole routine takes about five minutes — compare that to wrestling with AI Pine Script generators that still need you to understand code. The generated Pine Script follows best practices, organized and commented, ready to trade.
How to use Arnaud Legoux Moving Average Indicator?
ALMA is not a set-and-forget tool. You need to read what it's telling you. Here's what I've found after years of trading with it:
1. Reading the Trend
- Uptrend: Price holds above ALMA, the line angles up
- Downtrend: Price stays below ALMA, line points down
- Choppy: Price whipsaws around ALMA, the line flattens
- Strong trend: Steeper ALMA slope = more momentum
Patience matters. Wait for a clear direction before acting.
2. Entry Signals I Actually Use
Pullback method (my daily driver):
- Let a trend establish first — price above or below ALMA for consecutive bars
- Wait for a pullback toward the ALMA line
- Enter when price bounces off ALMA with volume
- Stop: other side of ALMA for longs or shorts
Crossover method:
- Price crosses above ALMA = consider going long
- Price crosses below ALMA = consider going short
- Confirm with ALMA slope direction first
- Works in trending markets, fails in sideways chop
3. Exits and Stops
Taking profits:
- Start scaling out when price stretches far from ALMA
- Full exit when ALMA slope flattens
- Trail your stop along ALMA as support or resistance
Stop placement:
- Initial stop on the opposite side of ALMA from your entry
- Move to breakeven once price moves 1.5x your initial risk
- Trail behind recent swing points as the trend extends
4. Multi-Timeframe Setup
I prefer a dual-timeframe approach here. Higher timeframe ALMA shows the big picture. Lower timeframe ALMA times the entry. Example on BTC/USD: the daily ALMA says uptrend, so I wait for the 4-hour ALMA to pull back before entering. I have not tested this on minute-level crypto scalping yet — the spreads eat into any edge.
5. Pairing With Other Tools
ALMA + RSI:
- ALMA for trend direction, RSI for momentum confirmation
- Buy pullbacks to ALMA when RSI is oversold in an uptrend
- Sell ALMA bounces when RSI is overbought in a downtrend
ALMA + Volume:
- Check volume whenever ALMA gives a signal
- Volume on the breakout bar = stronger conviction
- Weak volume on an ALMA cross = high chance of a fakeout
ALMA + Support / Resistance:
- Price bouncing off ALMA at a known S/R level = high-probability entry
- ALMA acting as dynamic support or resistance = trend continuation
- Price breaking both ALMA and a key level = potential reversal
6. Markets I've Tested It On
- Forex: EUR/USD and GBP/USD on 4H and daily. Reliable, especially during London and New York sessions. I skip it during major news releases — the Pine Script trading strategies I build usually have a news filter for that.
- Stocks: SPY and QQQ daily charts. Works well around earnings when the trend is clear. I do not use it on penny stocks — the gap moves break the smooth weighting logic.
- Crypto: Bitcoin and Ethereum on higher timeframes. Crypto's 24/7 volatility needs wider sigma values.
Common ALMA Mistakes
1. Wrong Timeframe
Do not use ALMA on a 1-minute chart if you're swing trading. Match the timeframe to your holding period.
2. Ignoring the Calendar
ALMA signals during NFP or FOMC releases can fall apart. Check the economic calendar before committing.
3. Over-Optimization
I wasted two weeks once tweaking ALMA parameters to get perfect backtest results. They failed live. Pick a setup and stick with it.
4. No Risk Management
"ALMA is so reliable" is a dangerous thought. No indicator is perfect. Always size your positions and set stops.
5. Fighting the Trend
Counter-trend trades against ALMA direction are not impossible, but they're low probability. Trade with the line, not against it.
The takeaway: wait for setups where multiple factors confirm ALMA's signal. Patience beats frequency.
Best ALMA Settings
After testing ALMA across different markets and timeframes, these are the configurations I have found that actually hold up outside backtests.
Default Setup (Start Here)
| Parameter | Value |
|---|---|
| Length | 9 |
| Offset | 0.85 |
| Sigma | 6 |
| Source | Close |
This is Arnaud's original setup and it works for most situations. Do not change it until you know why.
By Trading Style
| Style | Timeframe | Length | Offset | Sigma | Why |
|---|---|---|---|---|---|
| Scalping | 1-5 min | 7-9 | 0.9 | 5 | Fast entries, quick exits |
| Intraday swing | 15-60 min | 14-21 | 0.85 | 6 | Balances noise and response |
| Swing trading | Daily | 21-25 | 0.85 | 7-8 | Filters daily noise |
| Position trading | Weekly | 14-21 | 0.8 | 8-10 | Long-term trend ID |
| Long-term macro | Monthly | 12-24 | 0.75 | 10 | Smooth for major shifts |
By Market
| Market | Length | Offset | Sigma |
|---|---|---|---|
| EUR/USD, GBP/USD | 14 | 0.85 | 6 |
| GBP/JPY, AUD/JPY (volatile FX) | 21 | 0.8 | 8 |
| S&P 500, NASDAQ indices | 14-21 | 0.85 | 6-7 |
| Blue chip stocks | 21 | 0.85 | 7 |
| Growth stocks | 14 | 0.9 | 5 |
| Bitcoin / Ethereum | 14 | 0.9 | 5 |
| Altcoins | 21 | 0.8 | 7 |
Multi-ALMA Systems
Dual ALMA:
- Fast: Length 9, Offset 0.9, Sigma 5
- Slow: Length 21, Offset 0.8, Sigma 7
- Trade when both point the same direction
Triple ALMA:
- Short: Length 7, Offset 0.9, Sigma 4
- Medium: Length 14, Offset 0.85, Sigma 6
- Long: Length 28, Offset 0.8, Sigma 8
- Entry when all three align
These are not magic numbers. Test them on your market before risking real money. What works for EUR/USD might fail on Bitcoin.
How to Backtest ALMA
Testing your ALMA strategy before committing capital is not optional. Here's the workflow I use with Pineify's strategy builder.
Setting Up an ALMA Strategy in Pineify
- Open Pineify and create a new Strategy (not just an Indicator)
- Add ALMA with your settings
- Define entry conditions — crossover, pullback, slope
- Set exit rules — opposite signal, stop, take-profit
- Add position sizing
- Use Pineify's backtesting engine to run it across multiple market conditions
Basic ALMA Strategy Code
// Simple ALMA Crossover Strategy
//@version=5
strategy("ALMA Strategy", overlay=true)
// ALMA Settings
length = input.int(9, "ALMA Length")
offset = input.float(0.85, "Offset")
sigma = input.float(6, "Sigma")
// Calculate ALMA
alma = ta.alma(close, length, offset, sigma)
// Entry Conditions
long_condition = ta.crossover(close, alma)
short_condition = ta.crossunder(close, alma)
// Execute Trades
if long_condition
strategy.entry("Long", strategy.long)
if short_condition
strategy.entry("Short", strategy.short)
// Plot ALMA
plot(alma, "ALMA", color=color.blue, linewidth=2)
Key Metrics to Watch
Profitability:
- Net profit, profit factor (1.5+ target), win rate (45-65%), average trade
Risk:
- Max drawdown (under 20%), Sharpe ratio, Sortino ratio, max consecutive losses
Trade quality:
- Average win vs. average loss (1.5:1 or better), number of trades (100+ minimum)
Backtesting Best Practices
- Use at least 2-3 years of data including trending, sideways, and volatile periods
- Account for commissions, slippage (1-2 ticks), and spreads
- Include bull, bear, and sideways market conditions
- Do not optimize until results look perfect — that's overfitting
- Hold back some data for out-of-sample testing
Advanced Tests
Pullback strategy:
// ALMA Pullback Strategy
long_setup = close > alma and close[1] < alma[1] // Pullback to ALMA
long_entry = long_setup and close > close[1] // Bounce confirmation
short_setup = close < alma and close[1] > alma[1]
short_entry = short_setup and close < close[1]
Multi-timeframe test:
- Daily ALMA for trend, 4-hour for entry timing
- Only trade when both agree
- Compare results against single-timeframe approach
ALMA + RSI confirmation:
- ALMA for trend, RSI for overbought/oversold
- Volume filter for signal strength
- Compare against ALMA alone
Red Flags in Backtest Results
- Perfect or near-perfect equity curves (fitted to noise)
- All profits from one period or one symbol
- Drawdowns exceeding 25%
- Fewer than 50 trades
- Results that look too good to be true — they usually are
Backtesting proves nothing about future performance, but it filters out strategies that could not make money in the past. A strategy that fails on historical data will definitely fail going forward.
Frequently Asked Questions
▶What is the Arnaud Legoux Moving Average (ALMA) indicator?
ALMA is a moving average that weights price data using a Gaussian bell curve. Arnaud Legoux and Dimitrios Kouzis-Loukas created it as a cleaner alternative to SMA and EMA — less lag, fewer false signals. You tune it with length, offset, and sigma.
▶What are the default ALMA indicator settings?
Length 9, Offset 0.85, Sigma 6. These work well out of the box for most markets. Do not change them until you know what you're adjusting and why.
▶How is ALMA different from a simple moving average (SMA)?
SMA gives every price the same weight. ALMA uses a bell curve so recent prices matter more. That means less lag while the line stays smooth — the best of both worlds if you tune it right.
▶How do I add ALMA to TradingView using Pine Script?
Use the ta.alma() function in Pine Script, or skip the coding entirely with Pineify's visual editor. The generated code is clean and follows TradingView's best practices.
▶What markets and timeframes work best with the ALMA indicator?
Forex, stocks, crypto, and commodities all work. Higher timeframes (4H and daily) give the most reliable signals. Shorter timeframes need faster settings — lower sigma, higher offset.
▶What are the main limitations of the ALMA indicator?
ALMA whipsaws in sideways markets. It can lag during fast price moves if sigma is set too high. I always pair it with RSI or volume for confirmation. It's not a standalone system.



