//+------------------------------------------------------------------+
//|                                                 indicator_v1.mq4 |
//|                                         Developed by fxprotrader |
//|                                     http://www.fxpro-trader.com" |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2012, fxprotrader"
#property link      "http://www.fxpro-trader.com"
//-------- HISTORY----------------
// v0.1 Initial release(010072013)
//--------------------------------

#property indicator_chart_window
#property show_inputs

       string adminuser="admin";
       string adminpassword="1234";
extern string username="enter username";
extern string password="enter password";

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

//----
   return(0);
  }
//+------------------------------------------------------------------+
//                                                                   +
//+------------------------------------------------------------------+
int deinit(){

ObjectDelete("Passtext1");
      
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start(){

if(password != adminpassword && username != adminuser){
Alert("Password and UserName Incorrect!");
return(0);
}
string text1="Indicator Enabled";
string sObjName="Passtext1";
   ObjectCreate(sObjName, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(sObjName,text1, 10, "Corbel", YellowGreen);
   ObjectSet(sObjName, OBJPROP_CORNER, 0);
   ObjectSet(sObjName, OBJPROP_XDISTANCE, 300);//left to right
   ObjectSet(sObjName, OBJPROP_YDISTANCE, 20);//top to bottom

    int limit;
   int counted_bars=IndicatorCounted();
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   
   
//----
   return(0);
  }
//+------------------------------------------------------------------+