Часы, отображающие время на основном графике – Индикатор Форекс

0
(0)
Имя:
clock displaying time in main chart
Автор: де Врис (2012.09.24 00:56)
Скачано: 3290
Скачать:
Clock Displaying Time In Main Chart - Forex Indicator 1
Часы.mq4 (2.4 Кб) Вид
Clock Displaying Time In Main Chart - Forex Indicator 2The Clock indicator is placed 5 times on chart to show how you can use it on chart

It is not possible to place two clocks on your chart having the same time....

Although we have in Code_Base other clock indicators, it was still that in

the Online Library of the MetaEditor I did not find a simple Clock-indicator like this inside

С уважением,

Tjipke

khanman:
can you make it in sub window chart?

Да, I can...

//+------------------------------------------------------------------+
//|                                                       Clock2.mq4 |
//|                                Авторское право © 2012, Тжипке де Врис |
//|                                                                  |
//+------------------------------------------------------------------+
#авторское право собственности "Авторское право © 2012, Тжипке де Врис"
#ссылка на свойство      ""

#property indicator_chart_window

extern string Clocktext = "Сервер";
extern int Timezone.from.Server = 0;
extern int ClockSize = 14;
string FontType = "Verdana";
extern color ClockColor = Blue;
extern int ClockCorner = 0;
extern int yLine = 20;
extern int xCol = 10;
extern int window = 0;

//+------------------------------------------------------------------+
//| Функция инициализации пользовательского индикатора                         |
//+------------------------------------------------------------------+
int инициализация()
  {
//----
   если(ClockCorner>=4)
      { 
       пока (ClockCorner>=4){ClockCorner=ClockCorner-4;}
      } 
//----
   возвращаться(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
инт deinit()
  {
//----
   ОбъектУдалить("Clock"+Даблтостр(Timezone.from.Server,0));
//----
   возвращаться(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
начало()
  {
   int    counted_bars=IndicatorCounted();
//----

   DisplayText("Clock"+Даблтостр(Timezone.from.Server,0), yLine, xCol, Clocktext+"  "+ 
   TimeToStr((ВремяТекущее()+ ((  0 - Timezone.from.Server) * 3600)), TIME_SECONDS),ClockSize,FontType, ClockColor);   
//----
   возвращаться(0);
  }
//+------------------------------------------------------------------+
void DisplayText(string eName, int eYD, int eXD, string eText, int eSize, string eFont, color eColor) {
   ОбъектСоздать(eName, OBJ_LABEL, window, 0, 0);
   набор объектов(eName, OBJPROP_CORNER, ClockCorner);
   набор объектов(eName, OBJPROP_XDISTANCE, eXD);
   набор объектов(eName, OBJPROP_YDISTANCE, eYD);
   ObjectSetText(eName, eText, eSize, eFont, eColor);
}
//+------------------------------------------------------------------+

choose for window number of subwindow

0 main chart

1 next sub window....

Clock Displaying Time In Main Chart - Forex Indicator 3

Насколько полезным был этот пост?

Нажмите на звездочку, чтобы оценить!

Средний рейтинг 0 / 5. Подсчет голосов: 0

Голосов пока нет! Будьте первым, кто оценит этот пост.

Сожалеем, что этот пост не оказался для вас полезным!

Давайте улучшим этот пост!

Расскажите нам, как мы можем улучшить этот пост?



Автор: Команда Форекс Вики
Мы команда опытных трейдеров Forex. [2000-2023] которые посвящены жизни на наших собственных условиях. Наша основная цель - достижение финансовой независимости и свободы, и мы занимались самообразованием и приобрели обширный опыт на рынке Forex, чтобы достичь самодостаточного образа жизни..