All scripts
Pro · Invite-only on TradingView
Free · Open source
MA Suite
Up to eight moving averages – and one number that tells you how much they agree.
- Type
- Moving averages + trend score
- Replaces
- EMA · SMA
- Recommended
- Daily chart, 4h
- Price
- Free, open source
MA Suite combines up to eight moving averages in a single indicator. Each has its own type, length, timeframe, color and width. On top of that, a trend alignment score sums up all active averages in one number: how many of them currently confirm the direction – up or down? Crosses of MA 1 and MA 2 are marked and available as alerts. This page explains every element – and above all, what you do with it and why.
Overview
At a glance
What does it do?
It draws up to eight moving averages and counts how many of them confirm the current trend.
What do I do with it?
You set up your MA set once and see at a glance whether the trend is clean or whether the averages contradict each other.
Why?
A single average says little. When short, medium and long averages point the same way, the trend has broader support.
What do I get?
A tidy chart, a quick trend check and fewer trades against a clearly aligned majority.
On your chart in 2 minutes
Quickstart
- 01
Open the script page
The TradingView button at the top of this page takes you straight to the script page. The script is free and open source.
- 02
Add it to your favorites
On the script page, click Add to favorites (the star icon).
- 03
Add it to your chart
At the top of the chart, click Indicators, choose Favorites on the left and click MA Suite. Alternatively, search for “Indicatr” in the Indicators window.
- 04
Check the default set
Out of the box, three averages are active: EMA 21 (blue), SMA 50 (orange) and SMA 200 (purple). That’s a proven set for the daily chart – you can get started right away.
The chart explained
What you see on the chart
- 1MA 1 – EMA 21 The fast average (blue). Follows price closely.
- 2MA 2 – SMA 50 The medium average (orange). Shows the medium-term trend.
- 3MA 3 – SMA 200 The long average (purple). The well-known long-term line.
- 4MA 1 / MA 2 cross Green triangle below the candle: MA 1 crosses above MA 2. Red triangle above the candle: below.
- 5Trend alignment table Score and state for the current candle – here −3 / 3, “Fully aligned down”.
Elements 1 to 3
Your MA set
What does it do?
Each of the eight slots is a full moving average with its own type, length, timeframe, color and width.
What do I do with it?
You build yourself a fixed set – say short, medium, long – and use it the same way on every chart.
Why?
If you use different averages on every chart, you’re comparing apples and oranges. A fixed set trains your eye.
What do I get?
A calm, consistent view of the trend – and a chart that doesn’t disappear under ten separate indicators.
Seven MA types
| Type | Character |
|---|---|
| SMA | Simple average, every candle counts equally. Calm and slow. The classic 50 and 200 lines are usually SMAs. |
| EMA | Recent candles count more. Reacts faster than the SMA. Popular for short and medium lengths. |
| WMA | Linearly weighted, the most recent candles count most. Reacts quickly. |
| HMA | Hull Moving Average. Very fast and smooth, but can overshoot at turning points. |
| VWMA | Volume-weighted: candles with high volume count more. Needs real volume. |
| RMA | Wilder’s smoothing, as used in the RSI and the ATR. Very slow. |
| DEMA | Double exponential, with less lag than a regular EMA. |
Averages from a higher timeframe
Each average can be calculated on its own timeframe. That way you can see, for example, the 200-week line on the daily chart – MA 7 is already prepared for this (SMA 200 on a weekly basis, off by default).
Element 5
The trend alignment score
What does it do?
For each active average it gives +1 if price is above a rising average, −1 if it’s below a falling one, and 0 otherwise. The table shows the total and a state.
What do I do with it?
You use the score as a trend filter: long ideas with a positive score, short ideas with a negative one. With “Mixed” you’re cautious.
Why?
When price is above rising short, medium and long averages, participants with different time horizons are pulling in the same direction.
What do I get?
One number instead of a tangle of lines – and a clear answer to the question: how clean is this trend right now?
| State | Meaning |
|---|---|
| Fully aligned up | All active averages confirm the uptrend, for example +3 / 3. |
| Leaning up | More averages confirm up than down. |
| Mixed | A tie – the averages contradict each other or are flat. |
| Leaning down | More averages confirm down than up. |
| Fully aligned down | All active averages confirm the downtrend, for example −3 / 3. |
Element 4
Crosses of MA 1 and MA 2
When MA 1 (default: EMA 21) crosses above MA 2 (default: SMA 50), a green triangle appears below the candle. When it crosses below, a red triangle appears above the candle. You decide which averages cross through the settings of MA 1 and MA 2 – for example SMA 50 and SMA 200 for the classic “golden cross” and “death cross”.
Step by step
How to work with it
- 01
Set up your set
Choose a set – for example the default 21 / 50 / 200 – and stick with it. Optionally add a line from a higher timeframe as the big picture.
- 02
Read the score
Positive: you look for longs. Negative: shorts, or no new buys. “Mixed”: wait.
- 03
Wait for a pullback to the average
In an uptrend, pullbacks to the EMA 21 or the SMA 50 are classic entry zones. Wait until price shows stability there instead of jumping into the running move.
- 04
Check the price chart
Is there also a level there – an old high, a support? Then the zone carries more weight.
- 05
Set stop and size
Place the stop beyond the last swing low or well beyond the average, not right on it. Calculate the position size from the stop distance.
- 06
Follow the trade
If the score drops from “Fully aligned up” to “Mixed” or an opposite cross appears, that’s your cue to actively review the trade.
Before you take a trade
- Does the direction match the score?
- Are there important events coming up? Central banks, jobs data, inflation, earnings for stocks.
- Is there a major level right ahead of you where price has turned many times?
- What are the related markets doing? For stocks bond yields and risk sentiment, for gold the dollar and real yields.
- Does the stop distance fit your risk?
Recommendations
Which markets fit – and which don’t
Moving averages work best where price stays on one side of the lines for a longer time. The more often it crosses them, the more false crosses and the more restless the score.
S&P 500, Nasdaq and large-cap stocks
Daily chart
- Long trends with orderly pullbacks – exactly where averages act as dynamic support.
- Widely watched: a great many market participants follow the 50 and 200 lines on the daily chart. That’s why reactions at these lines are common.
- Real volume: the VWMA has a solid basis here too.
- Careful: earnings create gaps that jump over any average.
Gold and Bitcoin
Daily chart, 4h
- Both form trends lasting months – gold driven by the dollar and real yields, Bitcoin by general risk sentiment.
- Bitcoin trades around the clock – no overnight gaps, the averages run cleanly.
- Between the trends there are long sideways phases. The score shows “Mixed” there – take it seriously.
EUR/USD and major forex pairs
Daily chart
- Very liquid, but trends form over weeks. On smaller timeframes price crosses the averages constantly.
- No VWMA: forex only has the broker’s tick volume. Use EMA or SMA here.
GBP/NZD and other swinging crosses
4h and below
- Swinging instead of trending: price keeps cutting through the averages. Crosses alternate, and the score jumps between “Leaning up”, “Mixed” and “Leaning down”.
- Two central banks and a commodity currency pull in different directions – short spikes without follow-through.
- Thin and expensive: wide spreads make many small trades costly. No centralized volume for the VWMA.
Which timeframe?
- Daily and weekly chart: the home of the classic averages. The default 21 / 50 / 200 set is made for this.
- 4h: good for gold, Bitcoin and indices. Here the lines describe the trend of the last few weeks.
- 1h and below: averages cross far more often. Use shorter sets and combine them with a line from the daily chart for direction.
Both directions
Long and short
The score and crosses work in both directions by the same rules. The NVIDIA example shows both: for months a positive score with price above rising averages – and at the end “Fully aligned down” after the drop below all three lines.
The part that makes the difference
Practical tips
- One set, every chart. Set up your set once and save it via Defaults → Save as default in the settings window.
- Less is more. Three to four well-spread averages are usually enough. Eight similar lines make the chart fuller, not clearer.
- Averages are zones, not lines. Price rarely turns exactly on the average. Plan with a little room.
- Don’t put your stop right on the average. That’s where many stops sit – place it beyond the last swing low or with some distance.
- Take score changes seriously. Going from “Fully aligned” to “Mixed” is often the first warning that a trend is losing strength.
Don’t miss a thing
Setting up alerts
- 01
Open the alert window
At the top of the chart, click Alert or press
Alt + A. - 02
Choose the condition
Under Condition, select MA Suite and below it the alert you want.
- 03
Trigger
For crosses, use “Once per bar close” so the alert only fires on the finished candle.
- 04
Notification
Choose app, email or webhook and save.
| Alert | When it fires |
|---|---|
| MA1 crosses above MA2 | MA 1 crosses above MA 2. |
| MA1 crosses below MA2 | MA 1 crosses below MA 2. |
| Fully aligned up | All active averages confirm the uptrend. |
| Fully aligned down | All active averages confirm the downtrend. |
Reference
All settings
Double-click the name “MA Suite [Indicatr]” at the top left of the chart to open the settings. The general settings are at the top, followed by one group each for MA 1 to MA 8.
1 · General
- Color by slope (rising/falling)Default: off
- On: each average turns green when rising and red when falling. Off: each keeps its own color.
- Slope lookback (bars)Default: 3
- How many candles back the script compares whether an average is rising or falling. Applies to the coloring and the score. Larger = calmer, smaller = faster changes.
- Rising / FallingDefault: Green / Red
- Colors for rising and falling averages, for the cross triangles and for the score in the table.
- Show trend alignment scoreDefault: on
- The table at the top right with score and state.
- Mark crosses of MA 1 and MA 2Default: on
- The triangles at crosses of MA 1 and MA 2.
2 · MA 1 to MA 8
- OnDefault: on (MA 1–3)
- Turns the average on or off. Only active averages count toward the score.
- Type (dropdown)Default: EMA
- SMA, EMA, WMA, HMA, VWMA, RMA or DEMA.
- LenDefault: 21
- Length of the average in candles of the selected timeframe.
- TFDefault: Chart
- Chart: your chart’s timeframe. Alternatively a higher timeframe, for example 1 week.
- ColorDefault: Blue
- Line color (overridden by Color by slope).
- WidthDefault: 2
- Line width from 1 to 4.
| Slot | Default | On? |
|---|---|---|
| MA 1 | EMA 21 · Chart · blue · width 2 | on |
| MA 2 | SMA 50 · Chart · orange · width 2 | on |
| MA 3 | SMA 200 · Chart · purple · width 2 | on |
| MA 4 | EMA 9 · Chart · cyan · width 1 | off |
| MA 5 | EMA 100 · Chart · brown · width 1 | off |
| MA 6 | HMA 55 · Chart · pink · width 1 | off |
| MA 7 | SMA 200 · weekly · blue-gray · width 1 | off |
| MA 8 | VWMA 20 · Chart · green · width 1 | off |
The crosses always refer to MA 1 and MA 2. If you turn either of them off, there are no more crosses.
From practice
Common mistakes
- Using the score as an entry signal. It describes the state – you find the timing on the price chart.
- Trading every cross. In sideways phases the averages cross all the time – without follow-through.
- Too many similar averages. Eight lines between 20 and 50 count almost the same thing several times and distort the score.
- VWMA without real volume. On forex and many CFDs the basis is missing.
- Choosing a lower timeframe than the chart. Averages from a lower timeframe don’t give a clean picture on the chart – use the chart timeframe or a higher one.
- Constantly changing the set. Shifting the lengths until the past looks good means optimizing for chance.
FAQ
Does MA Suite repaint?
Averages on the chart timeframe only change on the current, still open candle. Averages from a higher timeframe move until the higher timeframe’s candle has closed. No look into the future is used.
How is the score calculated?
For each active average: +1 if price is above a rising average, −1 if it’s below a falling one, 0 otherwise. Whether an average is rising or falling is determined by Slope lookback (bars).
Why does the table show only one value?
It shows the state of the current candle. The score isn’t shown for past candles. For notifications on full alignment, there are the alerts.
Can I set up the golden cross / death cross?
Yes. Set MA 1 to SMA 50 and MA 2 to SMA 200. The triangles then mark exactly these crosses, and the alerts report them.
Does the VWMA work on forex?
Technically yes, in substance hardly. Forex has no centralized volume, only the broker’s tick volume. Use EMA or SMA there.
What does the script cost?
Nothing. MA Suite is free and open source on TradingView. You can look at the code and learn how it works.
How do you like MA Suite?
Your vote tells us what to work on next.
Support
Report a problem or share feedback
Something off with the script, unclear in the docs, or you have an idea? Write to us. We reply by email.
MA Suite
Up to eight moving averages in one indicator, condensed into one number: the trend alignment score.
For educational and analytical purposes only. Not financial advice. Marks and signals are not recommendations to buy or sell. Past behavior is no guarantee of the future. Trading involves a risk of loss.