//+------------------------------------------------------------------+
//|                                           affichage_paire-ut.mq4 |
//|                                                           Madjes |
//|                               http://madjes-trading.blogspot.com |
//+------------------------------------------------------------------+
#property copyright "Madjes"
#property link      "http://madjes-trading.blogspot.com"

#property indicator_chart_window

extern int Corner=0;
extern int taille=20;
extern string info="//--1 : Blanc; 2-Rouge; 3-Noir; 4-Bleu";
extern int couleur=1;

string tf;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators

if (couleur==1) couleur=White;
if (couleur==2) couleur=Red;
if (couleur==3) couleur=Black;
if (couleur==4) couleur=MidnightBlue;



//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----

ObjectDelete("TF");

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----

if (Period()==PERIOD_M1)  tf="M1";
if (Period()==PERIOD_M5)  tf="M5";
if (Period()==PERIOD_M15) tf="M15";
if (Period()==PERIOD_M30) tf="M30";
if (Period()==PERIOD_H1)  tf="H1";
if (Period()==PERIOD_H4)  tf="H4";
if (Period()==PERIOD_D1)  tf="D1";
if (Period()==PERIOD_W1)  tf="W1";
if (Period()==PERIOD_MN1) tf="MN1";


ObjectCreate("TF",OBJ_LABEL,0,0,0,0,0);
ObjectSet("TF",OBJPROP_CORNER,Corner);
ObjectSetText("TF",tf +" " + Symbol(),taille,"Arial Black",couleur);
ObjectSet("TF",OBJPROP_XDISTANCE,6);
ObjectSet("TF",OBJPROP_YDISTANCE,16);
//----
   return(0);
  }
//+------------------------------------------------------------------+