//+------------------------------------------------------------------+
//|                                                     BDMalarm.mq4 |
//|                                           Alguasta Software 2015 |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Alguasta Software 2015"
#property link      ""
#property version   "1.00"
#property strict
#property indicator_chart_window

enum alarmtypes {
   NONE=0,  // Reset alarm
   GEN=1,   // General alarm
   BUY=2,   // Buy alarm
   SELL=3,  // Sell alarm
};

extern alarmtypes testalarm=0;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {

      GlobalVariableSet("BDM$ALARM$"+ChartID(),testalarm);

   return(INIT_FAILED);
  }
int OnDeInit()
  {
   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[])
  {
//---
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
