Извените срочно надо.

 

Alert("Текущая время день", iTime(NULL,PERIOD_D1,5));

вот это выдает мне 0, добавил:

Alert("",GetLastError());

пишет ошибку 4054

ERR_INCORRECT_SERIESARRAY_USING4054Неправильное использование массива-таймсерии

что я не так делаю?

 
Sys15975382:

Alert("Текущая время день", iTime(NULL,PERIOD_D1,5));

вот это выдает мне 0, добавил:

Alert("",GetLastError());

пишет ошибку 4054

ERR_INCORRECT_SERIESARRAY_USING4054Неправильное использование массива-таймсерии

что я не так делаю?

Пишите в "Любой вопрос......."."Срочно надо" - НЕКРАСИВО.
 

Запятую на плюс менять не пробовали?

 
sergeyas:
Пишите в "Любой вопрос......."."Срочно надо" - НЕКРАСИВО.
но если действительно срочно надо.... значит надо.
 

может быть поможете?

sergeyas:
Пишите в "Любой вопрос......."."Срочно надо" - НЕКРАСИВО.

https://www.mql5.com/ru/forum/131277/page65

 

datetime it= iTime(NULL,PERIOD_D1,5);

Alert("Текущая время день"+it);

Где-то так, наверное, раз уж срочно.

Ну, еще отформатировать дату.

 

не помогло, таже ошибка:

//+------------------------------------------------------------------+
//|                                                         Test.mq4 |
//|                      Copyright © 2011, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   datetime it= iTime(NULL,PERIOD_D1,5);
   Alert(""+it);
   Alert("",GetLastError());
   return(0);
  }
//+------------------------------------------------------------------+
 
Sys15975382:

не помогло, таже ошибка:

Нет никакой ошибки. Только что проверил. GetLastError=0 не есть ошибка. (там, кстати, тоже плюс вместо запятой рекомендую)
 
2011.02.07 02:11:03 2009.07.03 23:59 Test EURJPY,H4: Alert: 4054
2011.02.07 02:11:03 2009.07.03 23:59 Test EURJPY,H4: Alert: ??????? ????? ????0

а это что не ошибка? время 0, ошибка 4054


 
Sys15975382:
2011.02.07 02:11:03 2009.07.03 23:59 Test EURJPY,H4: Alert: 4054
2011.02.07 02:11:03 2009.07.03 23:59 Test EURJPY,H4: Alert: ??????? ????? ????0

а это что не ошибка? время 0, ошибка 4054


03:04:07 it EURUSD,M5: loaded successfully
03:04:30 CTA0 EURUSD,M5: deinitialized
03:04:30 CTA0 EURUSD,M5: uninit reason 1
03:04:30 CTA0 EURUSD,M5: removed
03:04:30 it EURUSD,M5: initialized
03:04:33 it EURUSD,M5: Alert: 1296172800
03:04:33 it EURUSD,M5: Alert: 4066
03:04:46 it EURUSD,M5: Alert: 1296432000
03:04:46 it EURUSD,M5: Alert: 0
03:04:49 it EURUSD,M5: Alert: 1296432000
03:04:49 it EURUSD,M5: Alert: 0
03:04:49 it EURUSD,M5: Alert: 1296432000
03:04:49 it EURUSD,M5: Alert: 0
03:04:49 it EURUSD,M5: Alert: 1296432000
03:04:49 it EURUSD,M5: Alert: 0
03:05:00 it EURUSD,M5: Alert: 1296432000
03:05:00 it EURUSD,M5: Alert: 0
03:05:00 it EURUSD,M5: Alert: 1296432000
03:05:00 it EURUSD,M5: Alert: 0
03:05:00 it EURUSD,M5: Alert: 1296432000
03:05:00 it EURUSD,M5: Alert: 0
03:05:00 it EURUSD,M5: Alert: 1296432000
03:05:00 it EURUSD,M5: Alert: 0
03:05:00 it EURUSD,M5: Alert: 1296432000
03:05:00 it EURUSD,M5: Alert: 0
03:05:06 it EURUSD,M5: Alert: 1296432000
03:05:06 it EURUSD,M5: Alert: 0
03:05:06 it EURUSD,M5: Alert: 1296432000
03:05:06 it EURUSD,M5: Alert: 0
03:05:06 it EURUSD,M5: Alert: 1296432000
03:05:06 it EURUSD,M5: Alert: 0
03:05:06 it EURUSD,M5: Alert: 1296432000
03:05:06 it EURUSD,M5: Alert: 0
03:05:07 it EURUSD,M5: Alert: 1296432000
03:05:07 it EURUSD,M5: Alert: 0
03:05:07 it EURUSD,M5: Alert: 1296432000
03:05:07 it EURUSD,M5: Alert: 0
03:05:07 it EURUSD,M5: Alert: 1296432000
03:05:07 it EURUSD,M5: Alert: 0
03:05:08 it EURUSD,M5: Alert: 1296432000
03:05:08 it EURUSD,M5: Alert: 0
03:05:08 it EURUSD,M5: Alert: 1296432000
03:05:08 it EURUSD,M5: Alert: 0
03:05:08 it EURUSD,M5: Alert: 1296432000
03:05:08 it EURUSD,M5: Alert: 0
03:05:10 it EURUSD,M5: Alert: 1296432000
03:05:10 it EURUSD,M5: Alert: 0
03:05:10 it EURUSD,M5: Alert: 1296432000
03:05:10 it EURUSD,M5: Alert: 0
03:05:10 it EURUSD,M5: Alert: 1296432000
03:05:10 it EURUSD,M5: Alert: 0
03:05:11 it EURUSD,M5: Alert: 1296432000
03:05:11 it EURUSD,M5: Alert: 0
03:05:13 it EURUSD,M5: Alert: 1296432000
03:05:13 it EURUSD,M5: Alert: 0
03:05:13 it EURUSD,M5: Alert: 1296432000
03:05:13 it EURUSD,M5: Alert: 0
03:05:14 it EURUSD,M5: Alert: 1296432000
03:05:14 it EURUSD,M5: Alert: 0
03:05:14 it EURUSD,M5: Alert: 1296432000
03:05:14 it EURUSD,M5: Alert: 0
03:05:15 it EURUSD,M5: Alert: 1296432000
03:05:15 it EURUSD,M5: Alert: 0
03:05:17 it EURUSD,M5: Alert: 1296432000
03:05:17 it EURUSD,M5: Alert: 0
03:05:17 it EURUSD,M5: Alert: 1296432000
03:05:17 it EURUSD,M5: Alert: 0
03:05:17 it EURUSD,M5: Alert: 1296432000
03:05:17 it EURUSD,M5: Alert: 0
03:05:19 it EURUSD,M5: Alert: 1296432000
03:05:19 it EURUSD,M5: Alert: 0
03:05:20 it EURUSD,M5: Alert: 1296432000
03:05:20 it EURUSD,M5: Alert: 0
03:05:20 it EURUSD,M5: Alert: 1296432000
03:05:20 it EURUSD,M5: Alert: 0
03:05:26 it EURUSD,M5: Alert: 1296432000
03:05:26 it EURUSD,M5: Alert: 0
03:05:27 it EURUSD,M5: Alert: 1296432000
03:05:27 it EURUSD,M5: Alert: 0
03:05:29 it EURUSD,M5: Alert: 1296432000
03:05:29 it EURUSD,M5: Alert: 0
03:05:29 it EURUSD,M5: Alert: 1296432000
03:05:29 it EURUSD,M5: Alert: 0
03:05:29 it EURUSD,M5: Alert: 1296432000
03:05:29 it EURUSD,M5: Alert: 0
03:05:29 it EURUSD,M5: Alert: 1296432000
03:05:29 it EURUSD,M5: Alert: 0
03:05:29 it EURUSD,M5: Alert: 1296432000
03:05:29 it EURUSD,M5: Alert: 0
03:05:30 it EURUSD,M5: deinitialized
03:05:30 it EURUSD,M5: uninit reason 1
03:05:30 it EURUSD,M5: removed
 

У меня такой скрипт работает:

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
void start()
 {
  datetime it = iTime(NULL, PERIOD_D1, 5);
  Comment(it, "   GetLastError() = ", GetLastError());
  Alert("" + it);
  Alert("", GetLastError());
 }

Такие тоже работают:

void start()
 {
  Comment(iTime(NULL, PERIOD_D1, 5), "   GetLastError() = ", GetLastError());
  Alert(iTime(NULL, PERIOD_D1, 5), "  ", GetLastError());
 }
void start()
 {
  datetime it = iTime(NULL, PERIOD_D1, 5);
  Comment(it, "   GetLastError() = ", GetLastError());
  Alert(it, "  ", GetLastError());
 }
Причина обращения: