RainbowMMA_08
Download scriptThe Rainbow MMA 1 is a visual trading tool designed to help market observers track price trends by analyzing the relationship between multiple moving averages. Instead of relying on a single indicator, this script layers several different calculations to provide a more nuanced view of market momentum.
Core Methodology
The logic of this indicator is based on the "Moving Average" principle. It calculates the average price of an asset over specific periods of time. By using an "Exponential" smoothing method (EMA), the tool gives slightly more importance to recent price action, allowing it to react more dynamically to new market information than a simple moving average would.
How It Functions
The script tracks six distinct layers of data simultaneously. Each layer looks at a slightly different timeframe:
- Layer 1: Tracks the average over 25 periods.
- Layer 2: Tracks the average over 27 periods.
- Layer 3: Tracks the average over 29 periods.
- Layer 4: Tracks the average over 31 periods.
- Layer 5: Tracks the average over 33 periods.
- Layer 6: Tracks the average over 35 periods.
Visual Interpretation
Because these six averages are spaced very closely together (incrementing by only two units at a time), they do not appear as scattered lines. Instead, they cluster together to form a cohesive "ribbon" or "rainbow" effect on your chart.
When these lines move in unison, it signals a clear trend in the market. When they begin to spread apart or cross one another, it suggests a potential shift in momentum or an increase in market volatility. By observing the thickness and direction of this bundle, traders can better identify the prevailing trend of the current price action.
/*
*********************************************************************
Rainbow MMA 1
Copyright © 2006 Akuma99
http://www.beginnertrader.com
*********************************************************************
*/
#property copyright "Code written by - Akuma99"
#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 DeepSkyBlue
#property indicator_color2 DeepSkyBlue
#property indicator_color3 DeepSkyBlue
#property indicator_color4 DeepSkyBlue
#property indicator_color5 DeepSkyBlue
#property indicator_color6 DeepSkyBlue
#property indicator_color7 DeepSkyBlue
#property indicator_color8 DeepSkyBlue
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE,EMPTY,1);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE,EMPTY,1);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE,EMPTY,1);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE,EMPTY,1);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE,EMPTY,1);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE,EMPTY,1);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE,EMPTY,1);
SetIndexBuffer(6,ExtMapBuffer7);
SetIndexStyle(7,DRAW_LINE,EMPTY,1);
SetIndexBuffer(7,ExtMapBuffer8);
//----
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,25,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer2[i]=iMA(NULL,0,27,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer3[i]=iMA(NULL,0,29,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer4[i]=iMA(NULL,0,31,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer5[i]=iMA(NULL,0,33,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer6[i]=iMA(NULL,0,35,0,MODE_EMA,PRICE_CLOSE,i);
}
return(0);
}
//+------------------------------------------------------------------+
Comments