The Triangular Moving Average — known as TRIMA — gives algorithmic traders a smoother view of price trends by applying double-smoothing to price data. It cuts through short-term noise more aggressively than a standard moving average, making it a powerful tool for trend identification in systematic strategies.
What Is the Triangular Moving Average?
The Triangular Moving Average is a trend-following indicator that calculates the average of an average, producing a line that reacts slowly to sudden price moves. Unlike a simple moving average (SMA), which weights all periods equally, TRIMA places the heaviest weight on the middle periods in its lookback window. This creates a symmetrical, bell-curve-shaped weighting scheme across the data. The result is a smoother trend line that filters out spikes and reversals a standard SMA would pick up.
TRIMA is particularly useful in trend-following strategies where false signals from short-term noise are a persistent problem.
How Is the Triangular Moving Average Calculated?
TRIMA applies a two-step smoothing process to price data. First, it calculates a simple moving average of price over your chosen lookback period. Second, it calculates a moving average of that first moving average result. This double pass removes the spikes and short-term reversals that survive a single smoothing pass.
The period you set controls how smooth the final line becomes. A longer period produces a flatter, slower-moving line. A shorter period keeps TRIMA more responsive to recent price action. The trade-off is always between smoothness and lag.
How to Read Triangular Moving Average Signals?
TRIMA’s slope tells you the trend direction at a glance. A rising TRIMA line signals an uptrend. A falling TRIMA line signals a downtrend. A flat TRIMA signals a ranging market.
Price crossing above TRIMA signals a potential uptrend entry. Price crossing below TRIMA signals a potential downtrend entry or exit from a long position.
Because TRIMA smooths price more aggressively than an SMA or exponential moving average (EMA), its crossings occur less frequently. Each signal carries more weight — but the line also lags further behind price, meaning entries and exits arrive later than they would with a faster indicator.
Traders often pair a short-period TRIMA with a longer one to build a crossover system. This balances responsiveness with the noise-filtering benefits of double smoothing.
What Are the Best Triangular Moving Average Strategies?
TRIMA crossover strategy: Use a short-period TRIMA (such as period 10) and a long-period TRIMA (such as period 30). Enter long when the short TRIMA crosses above the long TRIMA. Exit or reverse when it crosses back below. This approach works best in sustained trending markets with clear directional momentum.
Price-TRIMA pullback strategy: Wait for price to pull back to the TRIMA line during an established uptrend. Enter long when price touches TRIMA and bounces in the trend direction. Set your stop-loss below the most recent swing low. This captures continuation moves with a lower-risk entry point than chasing price higher.
TRIMA with momentum confirmation: Combine TRIMA with an RSI block. Only take long entries above TRIMA when RSI confirms bullish momentum above the 50 level. This adds a second filter that reduces the number of false entries during weak or choppy trend conditions.
What Are Common Triangular Moving Average Mistakes to Avoid?
Using TRIMA in ranging markets: TRIMA lags heavily. In sideways markets, crossover signals arrive well after the price move is already over. Always confirm a trending environment using a volatility or trend-strength indicator before acting on TRIMA signals.
Choosing a period that is too long: A very long TRIMA produces a clean, visually appealing line — but it lags so far behind current price that entries arrive significantly late. Test multiple periods during backtesting and find the balance that suits your market and timeframe.
Acting on crossovers without confluence: TRIMA crossings are a starting point, not a complete system. Without supporting evidence from price structure or a second indicator, they generate too many low-quality setups. Always require at least one additional confirmation signal before entering a trade.
Ignoring the lag on exits: TRIMA’s smoothness works against you when a trend reverses sharply. A fast price drop can move well below TRIMA before the line turns down enough to trigger an exit. Combine TRIMA with a tighter stop-loss rule to protect profits on sudden reversals.
How to Build Triangular Moving Average Strategies in Arrow Algo?
Arrow Algo includes TRIMA in its visual indicator library. Drag the TRIMA block onto your strategy canvas and connect it to a price data input. Set your period in the block’s parameter panel — no formulas needed.
To build a crossover strategy, drag two TRIMA blocks onto the canvas with different period settings. Connect both to a comparison block that triggers when the short TRIMA crosses above the long TRIMA. Route that output to your entry logic block.
To add RSI confirmation, drag in an RSI block and connect both the TRIMA comparison and the RSI output to an AND logic block. The entry only fires when both conditions hold simultaneously.
Backtest your TRIMA strategy on live historical data from Binance, Coinbase, or HyperLiquid directly inside Arrow Algo. You test on the same exchange data your live strategy will use — no separate data sourcing needed. For a deeper look at validating strategies beyond basic backtesting, read our guide on walk-forward analysis.
What Are the Key Takeaways?
- The Triangular Moving Average is a double-smoothed trend indicator that weights the middle of the lookback window most heavily
- It applies two smoothing passes to price, removing short-term noise more aggressively than an SMA or EMA
- A rising TRIMA signals an uptrend; a falling TRIMA signals a downtrend
- TRIMA crossover strategies work best in trending markets — avoid them in ranging conditions
- TRIMA lags further than standard moving averages; always confirm signals with momentum or price structure
- Arrow Algo’s no-code builder lets you set up TRIMA crossover strategies with drag-and-drop blocks and test them on live exchange data
Disclaimer: The information provided in this article is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.
Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who’ve made the switch to systematic trading.
