
#property indicator_chart_window

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
    {
   return(0);
}

//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
    return(0);
}
  
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
    {
        
            
     int limit;
     int counted_bars = IndicatorCounted();
  //---- check for possible errors
     if(counted_bars < 0) return(-1);
  //---- the last counted bar will be recounted
     if(counted_bars > 0) counted_bars--;
     limit = Bars - counted_bars;

    Alert("limit: "+limit);

   return(0);
}
//+------------------------------------------------------------------+
