//+------------------------------------------------------------------+
//|                                               High low value.mq4 |
//|                                                  Copyright © 2012|
//+------------------------------------------------------------------+

#property indicator_chart_window

extern string font_type = "Tahoma";
extern int font_size = 12;
extern color font_color = Blue;
extern int H_position = 5;
extern int V_position = 1;


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

  
   return(0);
}

//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
   ObjectDelete("High");
   
   ObjectDelete("Low");

   return(0);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{ 

// Create High value
   if (ObjectFind("High")<0)
   ObjectCreate("High", OBJ_LABEL, 0, 0, 0);
   ObjectSet("High", OBJPROP_CORNER, 1);   //object conner: 0 - for top-left corner, 1 - top-right, 2 - bottom-left, 3 - bottom-right
   ObjectSet("High", OBJPROP_XDISTANCE, H_position);  //distance_x
   ObjectSet("High", OBJPROP_YDISTANCE, V_position);   //distance_y
   ObjectSetText("High", "High = " + DoubleToStr(High[0], Digits), font_size, font_type, font_color);
                                   

// Create Low value
   if (ObjectFind("Low")<0)
   ObjectCreate("Low", OBJ_LABEL, 0, 0, 0);
   ObjectSet("Low", OBJPROP_CORNER, 3);   //object conner: 0 - for top-left corner, 1 - top-right, 2 - bottom-left, 3 - bottom-right
   ObjectSet("Low", OBJPROP_XDISTANCE, H_position);  //distance_x
   ObjectSet("Low", OBJPROP_YDISTANCE, V_position);   //distance_y
   ObjectSetText("Low", "Low = " + DoubleToStr(Low[0], Digits), font_size, font_type, font_color);

       
   return(0);
}
//+------------------------------------------------------------------+