//+------------------------------------------------------------------+
//| Magnified Market Price.mq4        ver1.5             by Habeeb   |
//+------------------------------------------------------------------+

#property indicator_chart_window

  extern bool   Show_the_Time = True;
  extern bool   Show_the_Price = True; 

  extern color  Price_Up_Color = White;
  extern color  Price_Down_Color = White;
  extern int    Price_X_Position = 2;
  extern int    Price_Y_Position = 40;
  extern int    Price_Size=60;
  double        Old_Price;
  
  extern int    Chart_Timezone = 0;
  extern color  Time_Color = Yellow;
  extern int    Time_Size=30;
  extern int    Time_X_Position = 2;
  extern int    Time_Y_Position = 12;


int init()
  {
   return(0);
  }

int deinit()
  {
  ObjectDelete("Market_Price_Label");
  ObjectDelete("Time_Label");
  
  return(0);
  }

int start()
  {
if (Show_the_Price==true)
 {
   string Market_Price = DoubleToStr(Bid, Digits);
   
   ObjectCreate("Market_Price_Label", OBJ_LABEL, 0, 0, 0);
   
   if (Bid > Old_Price)
    ObjectSetText("Market_Price_Label", Market_Price, Price_Size, "Comic Sans MS", Price_Up_Color);
   if (Bid < Old_Price)
    ObjectSetText("Market_Price_Label", Market_Price, Price_Size, "Comic Sans MS", Price_Down_Color);
   Old_Price = Bid;

   ObjectSet("Market_Price_Label", OBJPROP_XDISTANCE, Price_X_Position);
   ObjectSet("Market_Price_Label", OBJPROP_YDISTANCE, Price_Y_Position);
 }
   
//----------------------------------

if (Show_the_Time==true)
 {
   int MyHour = TimeHour(TimeCurrent());
   int MyMinute = TimeMinute(TimeCurrent());
   
   if (MyMinute < 10)
    {
     string NewMinute = ("0" + MyMinute);
    }
   else  
   { 
    NewMinute = DoubleToStr(TimeMinute(TimeCurrent()),0);   
   }
   
   string NewHour = DoubleToStr(MyHour + Chart_Timezone, 0);
 
   ObjectCreate("Time_Label", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Time_Label", NewHour + ":" + NewMinute, Time_Size,  "Comic Sans MS", Time_Color);
   
   ObjectSet("Time_Label", OBJPROP_XDISTANCE, Time_X_Position);
   ObjectSet("Time_Label", OBJPROP_YDISTANCE, Time_Y_Position);
  }
 }