
#define major 1

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1  Gold

extern int N = 1;
extern int N2 = 1;

double UpperBuf[];

void init()
  {       
   SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 1);

   SetIndexDrawBegin(0, N);

   SetIndexBuffer(0, UpperBuf);
  }
void deinit() 
  {
  }  
void start() 
  {
   int counted = IndicatorCounted();
   if(counted < 0) 
       return (-1);
   if(counted > 0) 
       counted--;
   int limit = Bars - counted;
   for(int i = 0; i < limit; i++) 
     {
       UpperBuf[i] = iHigh(NULL, 0, iHighest(NULL, 0, MODE_HIGH, N, 
                           i));
     }
  }

