//+------------------------------------------------------------------+
//|                                                          AAA.mq4 |
//|                      Copyright © 2008, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, Mercury_Man_55@yahoo.com."
#property link      "Mercury_Man_55@yahoo.com"

#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 Magenta
#property indicator_color3 SkyBlue
#property indicator_color4 DeepSkyBlue
#property indicator_color5 White
#property indicator_color6 Yellow
#property indicator_color7 Lime
#property indicator_color8 Orange
//---- buffers
extern string Programmer="Mercury_Man_55@yahoo.com";
extern int No=15;
extern bool USDJPY=true;
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);
   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);
   SetIndexStyle(6,DRAW_LINE);
   SetIndexBuffer(6,ExtMapBuffer7);
   SetIndexStyle(7,DRAW_LINE);
   SetIndexBuffer(7,ExtMapBuffer8);
   SetLevelValue(0,0);
    
  
   SetIndexLabel(0,"DAY");
   SetIndexLabel(1,"4-Hour");
   SetIndexLabel(2,"1-Hour");
   SetIndexLabel(3,"30Minute");
   SetIndexLabel(4,"15-Minute");
   SetIndexLabel(5,"5-Minute");

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  } 
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----
      for(int i=0 ;i<=Bars; i++)
   { 
   double D=iClose(NULL,PERIOD_D1,i);
   double H4=iClose(NULL,PERIOD_H4,i+No);
   double H1=iClose(NULL,PERIOD_H1,i+No);
   double M30=iClose(NULL,PERIOD_M30,i+No);
   double M15=iClose(NULL,PERIOD_M15,i+No);
   double M5=iClose(NULL,PERIOD_M5,i+No);

   ExtMapBuffer1[i]=D;
   ExtMapBuffer2[i]=H4;
   ExtMapBuffer3[i]=H1;
   ExtMapBuffer4[i]=M30;
   ExtMapBuffer5[i]=M15;
   ExtMapBuffer6[i]=M5;

   
   
   }
//----
   return(0);
  }
//+------------------------------------------------------------------+