DragTrade_Toolbar

Author: Copyright � 2009, TheXpert
0 Views
0 Downloads
0 Favorites
DragTrade_Toolbar
//+------------------------------------------------------------------+
//|                                             DragTradeToolbar.mq4 |
//+------------------------------------------------------------------+

#property copyright "Copyright © 2009, TheXpert"
#property link      "theforexpert@gmail.com"

#property indicator_separate_window

#property indicator_maximum 0
#property indicator_minimum 0

string PeriodAsString()
{
   static string period;
   
   if (StringLen(period) == 0)
   {
      switch (Period()) 
      {
         case 60:     period = "H1"; break;
         case 240:    period = "H4"; break;
         case 1440:   period = "D1"; break;
         case 10080:  period = "W1"; break;
         case 43200:  period = "MN1";break;

         default:     period = "M" + Period();
      }
   }

   return (period);
}


string Name()
{
   static string name;
   
   if (StringLen(name) == 0)
   {
      name = "DragTrade Toolbar " + Symbol() + " " + PeriodAsString();
   }
   
   return (name);
}

int init()
{
   IndicatorShortName(Name());
   
   return(0);
}

int start()
{
   return(0);
}

Comments