RainbowMMA_10

Download script
Author: Code written by - Akuma99
RainbowMMA_10

The Rainbow MMA 1 is a technical analysis tool designed to help traders visualize price trends by smoothing out market "noise." Instead of looking at the raw, jagged movements of price action, this indicator provides a clearer picture of the underlying momentum by utilizing a series of Moving Averages (MA).

How the Logic Works

The core functionality of this script relies on Exponential Moving Averages (EMA). Unlike standard averages that treat all historical data equally, an exponential average places a higher weight on more recent price action. This makes the indicator more responsive to current market changes while still maintaining a smooth visual flow.

To create the "Rainbow" effect, the script calculates six distinct moving averages simultaneously. Each of these lines uses a slightly different timeframe or "period":

  • The first line tracks a very short-term average (8 periods).
  • Each subsequent line increases by exactly one period (9, 10, 11, 12, and 13).

Visual Interpretation

By plotting these six overlapping lines on your chart, the indicator creates a ribbon-like structure. This allows you to observe market sentiment in several ways:

  1. Trend Identification: When all lines are angled in the same direction (up or down), it signals a strong, established trend.
  2. Momentum Strength: The "spread" or distance between the lines indicates the strength of the move. When the lines fan out widely, momentum is high; when they cluster tightly together, the market may be consolidating or entering a period of indecision.
  3. Support and Resistance: These lines act as dynamic zones. In an uptrend, price often reacts to these lines as support, while in a downtrend, they can serve as overhead resistance.

In summary, this tool transforms complex price data into a cohesive visual ribbon, helping you identify the direction of the market and the intensity of its movements at a single glance.

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

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

//---- 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,8,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer2[i]=iMA(NULL,0,9,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer3[i]=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer4[i]=iMA(NULL,0,11,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer5[i]=iMA(NULL,0,12,0,MODE_EMA,PRICE_CLOSE,i);
      ExtMapBuffer6[i]=iMA(NULL,0,13,0,MODE_EMA,PRICE_CLOSE,i);
   }
   

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

Comments