Browse the library

Indicators · Trend and moving averages

Triangular moving average (TRIMA): the smoothest classic average

How the triangular moving average double-smooths prices, a worked example on Coca-Cola closes, why it turns late, and when its smoothness is worth it.

On this page
  1. Where the triangle comes from
  2. The formula
  3. Reading the TRIMA on a real chart
  4. How traders use the TRIMA
  5. Pitfalls and limitations
  6. Comparison with other averages
  7. How Finabase calculates and scores the TRIMA
  8. Frequently asked questions
  9. Summary

The triangular moving average (TRIMA) is a simple moving average of a simple moving average. Smoothing twice gives the middle of the window the most weight and the two ends the least, so the weights, drawn as a chart, form a triangle. The result is the smoothest of the classic fixed-window averages: it ignores far more day-to-day noise than an SMA of the same length.

That smoothness is useful when you want to see the shape of a trend or a price cycle without the wiggles. It comes at a cost that is easy to underestimate: the TRIMA is the slowest of the common averages to turn at a top or bottom. This guide shows the construction, a hand calculation with real Coca-Cola closes, how the TRIMA behaved around Coca-Cola's January 2026 low, and how Finabase computes and scores it.

Where the triangle comes from

An ordinary simple moving average treats every close in its window equally. If you take a second SMA of that first SMA, each original close gets counted several times: once for every first-stage average it appears in. A close in the middle of the overall window appears in the most first-stage averages; a close at either end appears in only one.

Count those appearances and you get the weights. For a 5-period TRIMA built from two 3-period SMAs, they are 1, 2, 3, 2, 1. For a 20-period TRIMA they are 1, 2, … 10, 10, … 2, 1, a triangle with a flat top two bars wide.

The idea of a centred, double-smoothed average comes from cycle analysis. J. M. Hurst's 1970 book on stock timing used centred averages to strip out short cycles and reveal longer ones. On a live chart the TRIMA is plotted at the latest bar, not centred, which is why it looks late; its weight is concentrated on prices from the middle of the window.

The formula

A worked example on Coca-Cola

Here is a 5-period TRIMA of Coca-Cola (KO) on January 9, 2026, built from that day's close and the four before it.

Date Close Weight Weight × close
Jan 5, 2026 $67.94 1 67.94
Jan 6, 2026 $67.84 2 135.68
Jan 7, 2026 $67.54 3 202.62
Jan 8, 2026 $69.37 2 138.74
Jan 9, 2026 $70.51 1 70.51
Total 9 615.49

TRIMA (5) = 615.49 ÷ 9 = $68.39.

The same number comes out of the two-stage route. The three 3-day SMAs that end on January 7, 8 and 9 are $67.77, $68.25 and $69.14. Their average is again $68.39.

Now notice what the triangle did. The two most recent closes, $69.37 and $70.51, were the start of a sharp rebound, but they got weights of only 2 and 1. The lowest close of the group, January 7's $67.54, got the top weight of 3. A plain 5-day SMA of the same closes is $68.64, and the last close was $70.51. The TRIMA was still describing the bottom.

Reading the TRIMA on a real chart

Coca-Cola (KO) daily with TRIMA (20) and SMA (20) · 2025-10-30 to 2026-10-29 $70 $80 $90 Low $67.27 · Jan 7 Price TRIMA (20) SMA (20) Nov Dec Jan 2026 Feb Mar Apr May Jun Jul Aug Sep Oct
Coca-Cola (KO), one year of daily bars with TRIMA (20) and SMA (20) as computed by Finabase.

Coca-Cola had a calm, persistent year: from $68.98 on October 30, 2025 to $92.82 on October 29, 2026, up about 35%, with a low of $67.27 on January 7, 2026. That is good terrain for a smooth average, and the chart shows why people like the TRIMA. It draws one clean, rounded curve through every pullback, while the SMA (20) bends at each small swing.

The counts confirm it. Over the year the TRIMA (20) changed direction 12 times; the SMA (20) changed direction 24 times.

The January low shows the cost. The SMA (20) bottomed at $69.71 on January 8, one session after the price low, and turned up. The TRIMA (20) kept falling until January 16, when it bottomed at $69.50. By then KO had already closed above $71. A rule that waited for the TRIMA to turn up would have entered about six sessions and several percent later than one using the SMA.

How traders use the TRIMA

To show the shape of a trend. The TRIMA's best use is descriptive. On a weekly or daily chart it shows whether a trend is accelerating, steady or rolling over, without the distraction of every small swing.

In cycle work. Followers of Hurst's methods use centred triangular averages to estimate where cycle lows and highs fell. Because the TRIMA's weight is centred, it follows a price cycle that is longer than its window and removes cycles that are shorter.

As a slow line in a crossover pair. Some traders use a TRIMA as the slow line and a fast EMA as the trigger, so that the slow line itself does not whipsaw. The trade-off is that the cross arrives later.

Pitfalls and limitations

Late turns. As the Coca-Cola example shows, the TRIMA is the last of the common averages to turn. That is the direct consequence of putting the most weight on the middle of the window, not on the latest bar.

Not a support line for fast markets. Because it rounds off swings, a TRIMA often sits well away from price in a fast move. Pullbacks rarely "touch" it the way they touch a 20-day EMA.

Same hard window as the SMA. Prices older than n bars drop out, but with weights of 1 at each end the drop-off effect is tiny, which is one reason the line is so smooth.

Comparison with other averages

Average Weight shape (n = 10) Lag on a steady trend Direction changes on KO (20-period, 1 year)
SMA Flat, 10% each 4.5 bars 24
TRIMA Triangle, peak 16.7% mid-window 4.5 bars 12
WMA Ramp, newest 18.2% 3.0 bars —
EMA Geometric decay, newest 18.2% 4.5 bars —

For the faster end of the family, see the Weighted moving average (WMA): linear weights, worked example and the Exponential moving average (EMA): formula and how to use it; for the consensus lines, the Simple moving average (SMA): formula, crossovers and limits.

How Finabase calculates and scores the TRIMA

Finabase computes the TRIMA with TA-Lib's TRIMA function on closing prices, using the two-stage SMA construction described above. The study appears as "Triangular Moving Average" and defaults to 10 periods; you can set any period. It is drawn on the price chart as an overlay.

In the technical gauge, TRIMA (10) is one of the overlay rows: a close at or above the line counts as Bullish, a close below it as Bearish. The Scanner tracks the same TRIMA (10) and lists the stocks whose close crossed it, with the date of the signal. Because the TRIMA turns late, a fresh cross often happens well after the price turn; check the chart before reading much into it.

Frequently asked questions

What is a triangular moving average?

It is a moving average of a moving average. Smoothing twice weights the middle of the window most heavily and the ends least, so the weights form a triangle. It is smoother than a simple moving average of the same length.

Is the TRIMA better than the SMA?

It is smoother, with about half as many direction changes on Coca-Cola's 2026 chart, but it turns later at highs and lows. It suits describing a trend; it is a poor choice when early signals matter.

Why is my TRIMA different from another platform's?

For even periods, platforms pick the two SMA lengths differently: some use two of n ÷ 2, which spans one bar fewer, and some use two of n ÷ 2 + 1, which spans one bar more. TA-Lib, which Finabase uses, combines n ÷ 2 and n ÷ 2 + 1, so a 20-period TRIMA spans exactly 20 closes.

Summary

The triangular moving average smooths twice, weighting the middle of its window and damping both ends. On Coca-Cola's steady 2026 uptrend it changed direction half as often as an SMA of the same length, and it turned up more than a week after the January low. Use it to see the shape of a trend or a cycle, not to catch the turn.

Sources and further reading

  1. J. M. Hurst, The Profit Magic of Stock Transaction Timing (Prentice-Hall, 1970) — centred averages and price cycles
  2. Robert W. Colby, The Encyclopedia of Technical Market Indicators, 2nd ed. (McGraw-Hill, 2003) — triangular moving average
  3. TA-Lib — TRIMA function reference
  4. Finabase chart data — KO daily bars, 2025-10-30 to 2026-10-29, TRIMA and SMA computed by Finabase