GMMA Long_v3
Download scriptThis script functions as a specialized technical analysis tool designed for the MetaTrader platform. It identifies and visualizes specific market trends by calculating multiple moving averages simultaneously, known in the trading community as the "Guppy Multiple Moving Average" (GMMA) logic.
Core Functionality
The primary objective of this script is to smooth out market price fluctuations to reveal the underlying momentum. Instead of relying on a single average, this tool tracks six distinct price averages at once. By layering these lines on your chart, it allows you to see how different timeframes and price velocities interact with one another.
How the Logic Works
The script processes the closing prices of the market and calculates six unique Exponential Moving Averages (EMAs). Each average is configured with a different period: 30, 35, 40, 45, 50, and 60.
- Data Processing: The script continuously scans historical price data to ensure that every point on your chart reflects these specific calculations in real-time.
- Visual Representation: It renders these six calculations as a series of lines. Because the periods are closely grouped (ranging from 30 to 60), these lines tend to cluster together during periods of high activity or clear trends.
- Trend Identification: By observing the "bundle" of these six lines, traders can identify significant shifts in market sentiment. When these lines move in a synchronized direction, it suggests a strong trend; when they begin to cross or spread out, it can signal potential volatility or a change in market momentum.
User Experience
This is a visual aid tool. It does not automatically execute trades or provide "buy/sell" alerts. Instead, it provides a clear, high-level overview of the market's "health" by grouping several indicators into one cohesive visual display, making it easier for a trader to distinguish between temporary price noise and sustained market movements.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| Guppy Mulitple Moving Average (Long).mq4 |
//| Code written by - Matt Trigwell |
//| |
//+------------------------------------------------------------------+
// ***** INSTRUCTIONS *****
// Add the GMMA Short indicator and the GMMA Long indicator to your charts.
// This is the GMMA Long indicator
// ***** 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
#property copyright "Code written by - Matt Trigwell"
#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Blue
#property indicator_color2 Blue
#property indicator_color3 Blue
#property indicator_color4 Blue
#property indicator_color5 Blue
#property indicator_color6 Blue
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
//+------------------------------------------------------------------+
//| 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);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
//----
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,30,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer2[i]=iMA(NULL,0,35,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer3[i]=iMA(NULL,0,40,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer4[i]=iMA(NULL,0,45,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer5[i]=iMA(NULL,0,50,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer6[i]=iMA(NULL,0,60,0,MODE_EMA,PRICE_CLOSE,i);
}
return(0);
}
//+------------------------------------------------------------------+
Comments