//+------------------------------------------------------------------+
//|                                                TF Display v3.mq4 |
//|                              http://www.forexfactory.com/saronko |
//|                                                                  |
//+------------------------------------------------------------------+

#property copyright "Saronko"
#property version   "3.00"
#property link      "http://www.forexfactory.com/saronko"
#property description "Indicator display Current Time Frame name and Symbol"     
#property indicator_chart_window

//**************Strig init
extern string  Corner_Note             = "0 top left, 1 top right, 2 bottom left, 3 bottom right";
extern int     Corner_Position_Text    = 1;
extern int     X_Position_Text         = 1;
extern int     Y_Position_Text         = 1;
extern int     Font_Size_Text          = 12;
extern color   colortext               = Silver;
extern string  font                    = "Arial";//Lucida Console etc

//**************Define Object
#define CurrentChart    "CurrTF3"


//Custom indicator initialization function 

int start()

   {
//****** Create Object start   
       ObjectCreate   (CurrentChart, OBJ_LABEL, 0, 0, 0);
       ObjectSet      (CurrentChart, OBJPROP_CORNER, Corner_Position_Text);
       ObjectSet      (CurrentChart, OBJPROP_YDISTANCE, 1+Y_Position_Text); //UP DOWN
       ObjectSet      (CurrentChart, OBJPROP_XDISTANCE, 1+X_Position_Text);//Left Right
      if(Period() == PERIOD_M1) ObjectSetText(CurrentChart,Symbol()+": M1", Font_Size_Text, font);
      if(Period() == PERIOD_M5) ObjectSetText(CurrentChart,Symbol()+": M5", Font_Size_Text, font);
      if(Period() == PERIOD_M15) ObjectSetText(CurrentChart,Symbol()+": M15", Font_Size_Text, font);
      if(Period() == PERIOD_M30) ObjectSetText(CurrentChart,Symbol()+": M30", Font_Size_Text, font);
      if(Period() == PERIOD_H1) ObjectSetText(CurrentChart,Symbol()+": H1", Font_Size_Text, font);
      if(Period() == PERIOD_H4) ObjectSetText(CurrentChart,Symbol()+": H4", Font_Size_Text, font);
      if(Period() == PERIOD_D1) ObjectSetText(CurrentChart,Symbol()+": D1", Font_Size_Text, font);
      if(Period() == PERIOD_W1) ObjectSetText(CurrentChart,Symbol()+": W1", Font_Size_Text, font);
      if(Period() == PERIOD_MN1) ObjectSetText(CurrentChart,Symbol()+": MN", Font_Size_Text, font);
      
    //  ObjectSetText("m.Simp", Symbol() + "  " + Period() + "m", mFontSize, mFont, mCol);
      ObjectSet(CurrentChart,OBJPROP_COLOR,colortext);
      
      
//****** Create Object end
   WindowRedraw();
   
return(0);
}
//--- INIT AND DEINIT ------------------------------------- //

int init()
{
  return(0); 
}
//--- Delete object
int deinit()
{
     
   ObjectDelete(CurrentChart);     
    
return(0);
}
//************************end of code