GMMA Short_v1

Download script
Author: Code written by - Matt Trigwell
GMMA Short_v1

This tool is designed to help traders visualize short-term market trends by analyzing price momentum through a cluster of moving averages. Instead of relying on a single line to show where the price is going, this script plots five distinct lines simultaneously, each representing a slightly different timeframe of "recent" history.

How it Works

The logic behind this indicator is based on identifying the "heartbeat" of the market. It calculates five individual Exponential Moving Averages (EMAs) using specific time intervals: 3, 7, 10, 12, and 15 periods. By using exponential averages rather than simple ones, the tool gives more weight to the most recent price action, allowing it to react more quickly to sudden market shifts.

The Visual Logic

When you view these five lines on a chart, they act as a cohesive group:

  • Trend Identification: When all five lines are moving in the same direction (all pointing up or all pointing down), it signals a strong, established trend in the short term.
  • Momentum Strength: The "tightness" of the cluster matters. When the lines are grouped closely together, it suggests high consensus and strong momentum. If the lines begin to spread out significantly, it indicates increasing volatility or uncertainty in the market.
  • Entry/Exit Cues: Traders often look for "crosses" or "fans." When the faster lines (like the 3 and 7) break away from the slower ones (like the 12 and 15), it can signal a change in momentum—potentially moving from a period of consolidation into a new trend.

Key Takeaways

In simple terms, this script acts as a "short-term sentiment" gauge. It filters out minor market noise to show you whether the immediate price action is leaning bullish (upward) or bearish (downward). By looking at the group as a whole rather than a single indicator, it provides a clearer picture of how much "agreement" there is among different short-term price cycles.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
8 Views
1 Downloads
0 Favorites
GMMA Short_v1
//+------------------------------------------------------------------+
//|                        Guppy Mulitple Moving Average (Short).mq4 |
//|                                  Code written by - Matt Trigwell |
//|                                                                  |
//+------------------------------------------------------------------+

// ***** For information on how to use this fantastic indicator *****
// http://www.guppytraders.com/
// http://www.market-analyst.com/kb/article.php/Guppy_Multiple_Moving_Average
// http://tradermike.net/2004/05/another_look_at_multiple_moving_averages

// ***** INSTRUCTIONS *****
// Add the GMMA Short indicator and the GMMA Long indicator to your charts.
// This is the GMMA Short indicator


#property copyright "Code written by - Matt Trigwell"


#property indicator_chart_window
#property indicator_buffers 5
#property indicator_color1 ForestGreen
#property indicator_color2 ForestGreen
#property indicator_color3 ForestGreen
#property indicator_color4 ForestGreen
#property indicator_color5 ForestGreen

//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexStyle(3,DRAW_LINE);
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexStyle(4,DRAW_LINE);
   SetIndexBuffer(4,ExtMapBuffer5);
//----
   return(0);
  }

int deinit()
  {
   return(0);
  }

int start()
  {
   int i,j,limit,counted_bars=IndicatorCounted();
   
   
   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   
   for(i=0; i<limit; i++){
      ExtMapBuffer1[i]=iMA(NULL,0,3,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer2[i]=iMA(NULL,0,7,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer3[i]=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer4[i]=iMA(NULL,0,12,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer5[i]=iMA(NULL,0,15,0,MODE_EMA,PRICE_CLOSE,i);
   }
   

   return(0);
  }
//+------------------------------------------------------------------+

Comments