RainbowMMA_05

Download script
Author: Code written by - Akuma99
RainbowMMA_05

The Rainbow MMA 1 is a technical analysis tool designed to help traders visualize market momentum and trend direction by smoothing out price fluctuations. Instead of looking at the raw, erratic movement of price alone, this indicator uses multiple layers of Moving Averages to create a clearer picture of where the market is heading.

Core Logic and Functionality

The logic behind this script relies on a "layered" approach to trend identification. It calculates six distinct Exponential Moving Averages (EMAs) simultaneously. Each of these averages uses a different time period, ranging from shorter durations to longer ones. By calculating these specific windows (71, 74, 78, 82, 86, and 90), the script creates a grouped set of data points that follow the price closely but filter out "market noise."

How it Works Visually

When you apply this indicator to a chart, it provides the following visual information:

  • Trend Identification: Because there are multiple lines moving in tandem, they act as a collective guide. When these lines move upward together, it signals a bullish (upward) trend. Conversely, when they move downward, it indicates a bearish (downward) trend.
  • Momentum and Convergence: The different periods allow you to see how the market is reacting over various timeframes at once. When the lines are tightly grouped together, it often suggests a period of consolidation or high consensus in price direction. When they begin to fan out or cross one another, it can indicate shifting momentum or a potential change in the market's current trend.
  • Smoothing Effect: By utilizing Exponential Moving Averages (EMAs), the script gives more weight to the most recent price data. This ensures that while the lines are "smooth" and easy to read, they remain responsive enough to react to significant new price actions quickly.

Summary for Traders

In essence, the Rainbow MMA 1 acts as a visual map of market sentiment. Rather than relying on a single line which might give false signals, it provides a bundle of six overlapping averages. This allows you to see the "flow" of the market—helping you identify when a trend is strong, when it is weakening, and when the price is potentially searching for a new direction.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
18 Views
0 Downloads
0 Favorites
RainbowMMA_05
/*

*********************************************************************
          
                        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 Lime
#property indicator_color2 Lime
#property indicator_color3 Red
#property indicator_color4 Red
#property indicator_color5 Red
#property indicator_color6 Red
#property indicator_color7 Red
#property indicator_color8 Red

//---- 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,71,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer2[i]=iMA(NULL,0,74,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer3[i]=iMA(NULL,0,78,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer4[i]=iMA(NULL,0,82,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer5[i]=iMA(NULL,0,86,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer6[i]=iMA(NULL,0,90,0,MODE_EMA,PRICE_CLOSE,i);
   }
   

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

Comments