GMMA Short_v3
Download scriptThis technical tool is designed to help traders visualize and interpret short-term market trends by analyzing price action through a series of layered averages. By using the "Guppy Multiple Moving Average" (GMMA) methodology, the script provides a clear visual representation of how quickly the price is reacting to recent market movements.
Core Logic and Functionality
The primary purpose of this script is to calculate five distinct "Exponential Moving Averages" (EMAs) simultaneously. Unlike a standard moving average that might only look at one point in time, these averages are weighted to give more importance to the most recent price data, allowing for a more responsive view of the market's current momentum.
The script processes these averages based on five different time horizons:
- Ultra-Short Term: Tracking very immediate changes (3 periods).
- Short Term: Capturing minor fluctuations (7 and 10 periods).
- Intermediate Short Term: Identifying the established trend of the current session (12 and 15 periods).
How it Works on Your Chart
When applied to a trading chart, the script calculates these five values for every historical bar available. It then draws them as a group of lines on your screen. Because all five lines are colored in a consistent forest green, they act as a visual "ribbon."
The logic follows these key principles:
- Trend Identification: When the lines are grouped closely together and moving in a specific direction (upward or downward), it signifies a strong, unified trend where different timeframes agree on the market's direction.
- Momentum Shifts: When the lines begin to spread apart or cross over one another, it indicates a potential change in momentum or a loss of strength in the current trend.
- Price Relationship: By observing how the price interacts with this "ribbon" of five averages, traders can better distinguish between actual trend reversals and temporary market "noise."
In summary, this tool simplifies complex price data into a readable visual cluster, helping you see not just where the price is now, but the collective "agreement" of multiple short-term trends at once.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| 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