Новая версия платформы MetaTrader 5 build 2980: Push-уведомления о торговых операциях - страница 14

 
Artyom Trishkin:

Версия 2998 доступна, но после каждого перезапуска терминала, версия остаётся 2994 и просит перезапустить для обновления

А "старый" MetaEditor закрыт? 

 
A100:

А "старый" MetaEditor закрыт? 

Да

 

b2998, просьба исправить поведение на прежнее (b2958).

Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий

Новая версия платформы MetaTrader 5 build 2940: Перенос витрин MQL5-сервисов в рабочую область и обновление дизайна

fxsaber, 2021.06.19 14:39

Веский довод, почему сейчас в Терминале неправильно. Переделал скрипт в советник.
// Скрипт позволяет увидеть, как формируется таблица истории ордеров
// при создании/удалении новых ордеров и без этого.

#property script_show_inputs

input bool inFlag = true;  // Проверка истории с открытием ордеров
input datetime inFrom = 0; // Не ноль приведет к ошибке и с новыми ордерами

#include <MT4Orders.mqh> // https://www.mql5.com/ru/code/16006

void OnTick()
{    
  MqlTick Tick;
  
  if (SymbolInfoTick(_Symbol, Tick) && Tick.ask)
  {
    Print("------------\n" + (string)inFlag); // Отделили строки разных запусков скрипта.
  
    if (inFlag) // Проверка на новых ордерах.
    {
      // Попытка сформировать кеш на случай, если начальная дата будет всегда постоянной, но ненулевой.
      HistorySelect(inFrom, INT_MAX);
      
      Print("Create/Delete orders.");
      
      // Создали первый ордер.
      const TICKET_TYPE Ticket1 = OrderSend(_Symbol, OP_BUYLIMIT, 0.1, Tick.ask - 1000 * _Point, 0, 0, 0);
      
      Sleep(2000); // Подождали и создали второй ордер.
      const TICKET_TYPE Ticket2 = OrderSend(_Symbol, OP_BUYLIMIT, 0.1, Tick.ask - 1000 * _Point, 0, 0, 0);
      
      Print(Ticket1); // Тикет первого.
      Print(Ticket2); // Тикет второго.
      
      OrderDelete(Ticket2); // Удалили второй - попал в историю.
      
      Sleep(2000); // Подождали и удалили первый - попал в историю.
      OrderDelete(Ticket1);
    
      // Проверка последовательности ордеров в истории - последних двух.
      if (HistorySelect(inFrom, INT_MAX))
      {
        Print("Check the History. inFrom = " + (string)inFrom);
        
        const int Total = HistoryOrdersTotal();
        
        for (int i = Total - 2; i < Total; i++)
          Print(HistoryOrderGetTicket(i)); // Распечатываем тикеты в конце таблицы. 
      }
  
      ExpertRemove();  
    }  
  }  
}


Результат Тестера.

2021.06.19 15:30:46.582 Core 1  EURUSD,M1: testing of Experts\Test9.ex5 from 2021.06.18 00:00 to 2021.06.19 00:00 started with inputs:
2021.06.19 15:30:46.582 Core 1    inFlag=true
2021.06.19 15:30:46.582 Core 1    inFrom=0
2021.06.19 15:30:46.582 Core 1  EURUSD : real ticks begin from 2021.03.15 00:00:00
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:00   ------------
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:00   true
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:00   Create/Delete orders.
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:00   buy limit 0.1 EURUSD at 1.18097 (1.19057 / 1.19097)
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:02   buy limit 0.1 EURUSD at 1.18097 (1.19057 / 1.19069)
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:02   2
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:02   3
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:02   order canceled [#3 buy limit 0.1 EURUSD at 1.18097]
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:04   order canceled [#2 buy limit 0.1 EURUSD at 1.18097]
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:04   Check the History. inFrom = 1970.01.01 00:00:00
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:04   3
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:04   2
2021.06.19 15:30:46.582 Core 1  2021.06.18 00:00:04   ExpertRemove() function called

Все четко и правильно в Тестере! Это не повод ломать Тестер. Это повод вернуть хотя бы поведение Терминала к тому, что было еще в b2958. Там работало только для inFrom = 0, но работало. В Тестере работает для любого inFrom правильно. Это абсолютно логично.


Что имеем на данный момент. HistorySelect в Терминале и в Тестере работают разными алгоритмами. При этом в Тестере этот алгоритм удобный и логичный, да еще и супер-быстрый - дозапись всего, что приходит в историю, в конец таблицы. В Терминале же - нет.


Заметьте, не упоминаю сортировку по какому-либо признаку во время работы советника. Просто говорю о дозаписи в конец (а не в середину) новых элементов истории.

Если же говорить о сортировке, то она нужна только один раз - при запуске советника. И сортировка должна быть по ORDER_TIME_DONE_MSC (при совпадающих значениях - по тикету). Тогда будет полная однозначность HistorySelect-таблицы во время работы и сразу после запуска.

 

b2998, предупреждения сыпятся на таком коде.

#include <WinAPI\WinAPI.mqh>


no #import declaration  winnt.mqh       3622    10
no #import declaration  winnt.mqh       3623    10
no #import declaration  winnt.mqh       3624    10
no #import declaration  winnt.mqh       3628    10
no #import declaration  winnt.mqh       3629    10
no #import declaration  winnt.mqh       3630    10
no #import declaration  winnt.mqh       3631    10
no #import declaration  winnt.mqh       3632    10
no #import declaration  winnt.mqh       3633    10
no #import declaration  winnt.mqh       3634    10
no #import declaration  winnt.mqh       3635    10
no #import declaration  winnt.mqh       3636    10
no #import declaration  winnt.mqh       3637    10
no #import declaration  winnt.mqh       3638    10
no #import declaration  winnt.mqh       3639    10
no #import declaration  winnt.mqh       3640    10
no #import declaration  fileapi.mqh     72      8
no #import declaration  fileapi.mqh     73      8
no #import declaration  fileapi.mqh     74      8
no #import declaration  fileapi.mqh     75      8
no #import declaration  fileapi.mqh     76      8
no #import declaration  fileapi.mqh     77      8
no #import declaration  fileapi.mqh     78      8
no #import declaration  fileapi.mqh     79      8
no #import declaration  fileapi.mqh     80      8
no #import declaration  fileapi.mqh     81      8
no #import declaration  fileapi.mqh     82      8
no #import declaration  fileapi.mqh     83      8
no #import declaration  fileapi.mqh     84      8
no #import declaration  fileapi.mqh     85      8
no #import declaration  fileapi.mqh     86      8
no #import declaration  fileapi.mqh     87      8
no #import declaration  fileapi.mqh     88      8
no #import declaration  fileapi.mqh     89      8
no #import declaration  fileapi.mqh     90      8
no #import declaration  fileapi.mqh     91      8
no #import declaration  fileapi.mqh     92      8
no #import declaration  fileapi.mqh     93      8
no #import declaration  fileapi.mqh     94      8
no #import declaration  fileapi.mqh     95      8
no #import declaration  fileapi.mqh     96      8
no #import declaration  fileapi.mqh     97      8
no #import declaration  fileapi.mqh     98      8
no #import declaration  fileapi.mqh     99      8
no #import declaration  fileapi.mqh     100     8
no #import declaration  fileapi.mqh     101     8
no #import declaration  fileapi.mqh     102     8
no #import declaration  fileapi.mqh     103     8
no #import declaration  fileapi.mqh     104     8
no #import declaration  fileapi.mqh     105     8
no #import declaration  fileapi.mqh     106     8
no #import declaration  fileapi.mqh     107     8
no #import declaration  fileapi.mqh     108     8
no #import declaration  fileapi.mqh     109     8
no #import declaration  fileapi.mqh     110     8
no #import declaration  fileapi.mqh     111     8
no #import declaration  fileapi.mqh     112     8
no #import declaration  fileapi.mqh     113     8
no #import declaration  fileapi.mqh     114     8
no #import declaration  fileapi.mqh     115     8
no #import declaration  fileapi.mqh     116     8
no #import declaration  fileapi.mqh     117     8
no #import declaration  fileapi.mqh     118     8
no #import declaration  fileapi.mqh     119     8
no #import declaration  fileapi.mqh     120     8
no #import declaration  fileapi.mqh     121     8
no #import declaration  fileapi.mqh     122     8
no #import declaration  fileapi.mqh     123     8
no #import declaration  fileapi.mqh     124     8
no #import declaration  fileapi.mqh     125     8
no #import declaration  fileapi.mqh     126     8
no #import declaration  fileapi.mqh     127     8
no #import declaration  fileapi.mqh     128     8
no #import declaration  fileapi.mqh     129     8
no #import declaration  fileapi.mqh     130     8
no #import declaration  fileapi.mqh     131     8
no #import declaration  fileapi.mqh     132     8
no #import declaration  fileapi.mqh     133     8
no #import declaration  fileapi.mqh     134     8
no #import declaration  fileapi.mqh     135     8
no #import declaration  fileapi.mqh     136     8
no #import declaration  fileapi.mqh     137     8
no #import declaration  fileapi.mqh     138     8
no #import declaration  fileapi.mqh     139     8
no #import declaration  fileapi.mqh     140     8
no #import declaration  fileapi.mqh     141     8
no #import declaration  fileapi.mqh     142     8
no #import declaration  fileapi.mqh     143     8
no #import declaration  fileapi.mqh     144     8
no #import declaration  winbase.mqh     491     24
no #import declaration  winbase.mqh     492     24
no #import declaration  winbase.mqh     493     24
no #import declaration  winbase.mqh     494     24
no #import declaration  winbase.mqh     495     24
no #import declaration  winbase.mqh     496     24
no #import declaration  winbase.mqh     497     24
no #import declaration  winbase.mqh     498     24
no #import declaration  winbase.mqh     499     24
no #import declaration  winbase.mqh     500     24
no #import declaration  winbase.mqh     501     24
 
fxsaber:

Стал обновляться b2982->b2990 после того, как прочел это сообщение, спасибо. У меня были до этого приготовлены кастомные символы.

Не нужны были, поэтому без переживаний обновил. После обновления все кастомные символы пропали (в CTRL+U пусто). Баровая и тиковая история в папке выше осталась нетронутой.

Полный лог первого старта обновления.

Думаю, разработчики могут легко воспроизвести ситуацию. Достаточно в предыдущем билде создать кастомный символ и обновиться.

Знаю, что кастомные символы вы не используете. Но к ситуации подключились, за что отдельное спасибо.

Скажите, на последовавших билдах у вас ситуация изменилась ?

У меня, например, нет. В том числе и на 2999-ом кастомные символы по прежнему недоступны.

 
Yurixx:

Скажите, на последовавших билдах у вас ситуация изменилась ?

У меня, например, нет. В том числе и на 2999-ом кастомные символы по прежнему недоступны.

b2998->b2999 - кастомные на месте.

 
fxsaber:

b2998, предупреждения сыпятся на таком коде.

Спасибо за сообщение. Исправлено

 
fxsaber:

b2998->b2999 - кастомные на месте.

Спасибо, интересно.

То есть b2999 у меня встал некорректно.

Может снести МТ5 совсем и поставить его заново из дистрибутива ?

Никогда не сталкивался с такой ситуацией.

 
Yurixx:

Может снести МТ5 совсем и поставить его заново из дистрибутива ?

В данном случае быстрее будет попробовать все варианты.

 
fxsaber:

В данном случае быстрее будет попробовать все варианты.

А что, есть варианты кроме дистрибутива ?

Причина обращения: