Guppy Multiple Moving Average Pine Script — Complete TradingView Guide

The Guppy Multiple Moving Average (GMMA) is a dual-ribbon trend indicator built from twelve exponential moving averages that reveals the interaction between short-term traders and long-term investors directly on your TradingView chart. Developed by Australian trader Daryl Guppy in the 1990s, GMMA uses a blue ribbon (EMA 3–15) to represent fast-moving speculative activity and a red ribbon (EMA 30–60) to represent slower institutional positioning. When the blue ribbon crosses above and separates from the red ribbon, a confirmed uptrend is in progress. In Pine Script v6, GMMA is implemented with twelve ta.ema() calls and two fill() overlays. Pineify can generate, customise, and deploy this indicator to TradingView in seconds — no coding required.

What Is the Guppy Multiple Moving Average?

The Guppy Multiple Moving Average (GMMA) is a trend-following overlay indicator that plots twelve exponential moving averages in two colour-coded groups to simultaneously track short-term trader sentiment and long-term investor commitment on any price chart. Daryl Guppy, an Australian private trader and author, published the methodology in his 1996 book Share Trading and later popularised it globally through hisTraders and Investors framework.

The Two Ribbon Groups

GMMA divides twelve EMAs into two distinct groups:

  • Short-term group (Traders): EMA 3, 5, 8, 10, 12, 15 — plotted in blue, these fast EMAs respond quickly to price changes and represent speculative activity.
  • Long-term group (Investors): EMA 30, 35, 40, 45, 50, 60 — plotted in red, these slow EMAs reflect the cost basis of position traders and fund managers.

Core Formula

Each GMMA line is a standard exponential moving average: EMA(n) = Price × k + EMA(n-1) × (1 − k), where k = 2 ÷ (period + 1). In Pine Script v6 this is called with ta.ema(source, length). No additional smoothing or weighting is applied — the diagnostic power comes entirely from the relative position and spacing of the twelve lines rather than from formula complexity.

Reading Ribbon Behaviour

There are four key ribbon states traders use to make decisions:

  1. Separation (bullish): Blue ribbon is above and moving away from the red ribbon — strong uptrend confirmed.
  2. Separation (bearish): Red ribbon is above and moving away from the blue ribbon — strong downtrend confirmed.
  3. Compression: Lines within one or both ribbons are bunching together — consolidation phase, a breakout is imminent.
  4. Intertwining: Both ribbons are overlapping and tangled — avoid trading; no dominant trend exists.

Applicable Markets and Timeframes

The Guppy Multiple Moving Average works on any liquid trending market. Daryl Guppy originally designed it for Australian equities on the daily chart, but it is now widely used in forex (EUR/USD, GBP/USD), crypto (BTC/USDT, ETH/USDT), and futures. The recommended minimum timeframe is the 15-minute chart for day-trading crypto and the 1-hour or daily chart for swing trading stocks. Avoid the 1-minute and 5-minute charts — the short-term EMA group becomes excessively noisy.

Pine Script Code Example

The code below implements the complete Guppy Multiple Moving Average in Pine Script v6 with both ribbon groups and fill areas for visual clarity. Copy the entire script, open TradingView Pine Script Editor (Alt+P), paste it in, and click Add to chart — the two coloured ribbons will appear immediately as an overlay on your price chart.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Pineify

//@version=6
indicator(title="Guppy Multiple Moving Average", overlay=true, max_labels_count=500)

// Short-term group EMAs (representing traders)
short_ema_3  = ta.ema(close, 3)
short_ema_5  = ta.ema(close, 5)
short_ema_8  = ta.ema(close, 8)
short_ema_10 = ta.ema(close, 10)
short_ema_12 = ta.ema(close, 12)
short_ema_15 = ta.ema(close, 15)

// Long-term group EMAs (representing investors)
long_ema_30 = ta.ema(close, 30)
long_ema_35 = ta.ema(close, 35)
long_ema_40 = ta.ema(close, 40)
long_ema_45 = ta.ema(close, 45)
long_ema_50 = ta.ema(close, 50)
long_ema_60 = ta.ema(close, 60)

// Short-term group plots (Traders) — blue ribbon
p_short3  = plot(short_ema_3,  title="GMMA - Short EMA 3",  color=color.rgb(0, 102, 255, 0), linewidth=1)
plot(short_ema_5,  title="GMMA - Short EMA 5",  color=color.rgb(0, 102, 255, 0), linewidth=1)
plot(short_ema_8,  title="GMMA - Short EMA 8",  color=color.rgb(0, 102, 255, 0), linewidth=1)
plot(short_ema_10, title="GMMA - Short EMA 10", color=color.rgb(0, 102, 255, 0), linewidth=1)
plot(short_ema_12, title="GMMA - Short EMA 12", color=color.rgb(0, 102, 255, 0), linewidth=1)
p_short15 = plot(short_ema_15, title="GMMA - Short EMA 15", color=color.rgb(0, 102, 255, 0), linewidth=1)

// Long-term group plots (Investors) — red ribbon
p_long30  = plot(long_ema_30, title="GMMA - Long EMA 30", color=color.rgb(255, 0, 51, 0), linewidth=1)
plot(long_ema_35, title="GMMA - Long EMA 35", color=color.rgb(255, 0, 51, 0), linewidth=1)
plot(long_ema_40, title="GMMA - Long EMA 40", color=color.rgb(255, 0, 51, 0), linewidth=1)
plot(long_ema_45, title="GMMA - Long EMA 45", color=color.rgb(255, 0, 51, 0), linewidth=1)
plot(long_ema_50, title="GMMA - Long EMA 50", color=color.rgb(255, 0, 51, 0), linewidth=1)
p_long60  = plot(long_ema_60, title="GMMA - Long EMA 60", color=color.rgb(255, 0, 51, 0), linewidth=1)

// Fill ribbons for visual clarity
fill(p_short3,  p_short15, title="GMMA - Short Group Fill", color=color.rgb(0, 102, 255, 90))
fill(p_long30,  p_long60,  title="GMMA - Long Group Fill",  color=color.rgb(255, 0, 51, 90))
Guppy Multiple Moving Average indicator Pine Script code example in TradingView

Parameters

The classic GMMA uses fixed period values defined by Daryl Guppy. The table below documents each EMA group and its role.

ParameterDefault ValueDescriptionRecommended Range
Short EMA 13Fastest trader EMA; most responsive to price3–5
Short EMA 25Second short-term EMA for ribbon width5–8
Short EMA 38Middle short-term EMA8–10
Short EMA 410Fourth short-term EMA10–12
Short EMA 512Fifth short-term EMA12–14
Short EMA 615Slowest trader EMA; outer boundary of short ribbon15–21
Long EMA 130Fastest investor EMA; inner boundary of long ribbon25–30
Long EMA 235Second long-term EMA for ribbon width33–38
Long EMA 340Middle long-term EMA38–44
Long EMA 445Fourth long-term EMA43–48
Long EMA 550Fifth long-term EMA48–55
Long EMA 660Slowest investor EMA; outer boundary of long ribbon55–65
sourceclosePrice series used as EMA inputclose / hlc3
Tuning Scenarios:
  • Daily swing trading (stocks/forex): Use the default Guppy periods (3–15, 30–60) on the 1-hour or daily chart for the cleanest signals.
  • Crypto scalping (15-min chart): Halve all periods (2–8 short, 15–30 long) to speed up ribbon response while keeping separation logic intact.
  • Weekly trend analysis: Double all periods (6–30 short, 60–120 long) to filter out medium-term noise and focus on multi-month trend direction.

Trading Strategies

The Guppy Multiple Moving Average generates three high-probability strategies based on ribbon interaction, compression, and cross-confirmation with other indicators.

Strategy 1: Ribbon Crossover Trend Entry

Market environment: trending (applies to stocks, crypto, forex)

Entry conditions:

  1. The blue short-term ribbon (EMA 3–15) crosses above the red long-term ribbon (EMA 30–60).
  2. The short-term ribbon is expanding (lines spreading apart), not compressing.
  3. ADX is above 20, confirming trend strength (combine with ADX indicator).
  4. Enter long on the close of the candle that completes the crossover.

Exit conditions:

  1. The short-term ribbon crosses back below the long-term ribbon.
  2. The long-term ribbon begins to slope downward or compress significantly.

Strategy 2: Compression Breakout

Market environment: transitioning from consolidation to trend

Entry conditions:

  1. Both the short-term and long-term ribbons are compressed (EMAs within each group are close together).
  2. A strong breakout candle closes outside the compressed ribbon zone with above-average volume.
  3. The short-term ribbon begins expanding in the direction of the breakout.
  4. Confirm with Bollinger Bands: price closes outside the upper/lower band on the same candle.
  5. Enter in the direction of the breakout on the next candle open.

Exit conditions:

  1. The short-term ribbon re-enters and overlaps with the long-term ribbon.
  2. Price closes back inside the compression zone.

Strategy 3: Pullback to Long-Term Ribbon

Market environment: established uptrend, suitable for stocks and crypto daily charts

Entry conditions:

  1. Both ribbons are separated bullishly (blue above red, both pointing up).
  2. Price pulls back and touches or enters the top of the red long-term ribbon (EMA 30).
  3. RSI on the same timeframe is between 40 and 55 (oversold without trend reversal).
  4. A bullish reversal candle (hammer, engulfing) forms at the long-term ribbon level.
  5. Enter long on the close of the reversal candle with a stop below EMA 60.

Exit conditions:

  1. Price closes below EMA 60 (long-term ribbon lower boundary), invalidating the trend.
  2. RSI diverges bearishly at a new price high.
Disclaimer: These strategies are for educational purposes only and do not constitute investment advice. Past performance does not guarantee future results. Always use risk management and test any strategy on historical data before trading with real capital.

How to Generate GMMA in Pineify

Pineify generates, customises, and deploys the Guppy Multiple Moving Average to TradingView without writing a single line of Pine Script manually.

  1. 1

    Open Pineify at pineify.app

    Navigate to pineify.app and sign in with your TradingView account to access the indicator builder.

  2. 2

    Click "New Indicator" and select GMMA

    From the indicator library, search for "Guppy Multiple Moving Average" or browse the Moving Averages category to find the GMMA template.

  3. 3

    Describe any customisations you need

    Tell Pineify's AI agent exactly what you want: custom EMA periods, different source inputs (HLC3 instead of close), alerts for ribbon crossovers, or combined conditions with RSI or ADX.

  4. 4

    Copy the generated Pine Script v6 code

    Pineify generates a complete, ready-to-paste Pine Script v6 file with all your customisations applied. Click the copy button to get the code.

  5. 5

    Adjust parameters and publish to TradingView

    Paste the code into TradingView Pine Script Editor (Alt+P), click "Add to chart", and fine-tune ribbon colours or period values using the indicator settings panel.

Frequently Asked Questions

Common questions about the Guppy Multiple Moving Average in Pine Script and TradingView.

Related Indicators

Explore other Pine Script indicators commonly used alongside the Guppy Multiple Moving Average.

Build Your Own GMMA Indicator — Free

Pineify generates custom Pine Script v6 code for the Guppy Multiple Moving Average and 100+ other indicators. No coding required — describe what you want and deploy to TradingView in seconds.