//+------------------------------------------------------------------+
//|                                                     shinewel.mq4 |
//|                                                           .....h |
//|                                                    hayseedfx.com |
//+------------------------------------------------------------------+
#property copyright ".....h"
#property link      "hayseedfx.com"
#property version   "1.00"
#property strict
#property indicator_chart_window


 extern int   begin = 10;
 extern int   end   =  0;


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---

   double highest = High[iHighest(Symbol(),0,MODE_HIGH,begin,end)];
   double lowest  = Low[iLowest(Symbol(),0,MODE_LOW,begin,end)];
   
   double pips    = (highest-lowest)/(Point*10);
   
   
 Comment("high low range is "+DoubleToStr(pips,0)+" between bars "+DoubleToStr(begin,0)+" and "+DoubleToStr(end,0));



   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
