MetaEditor build 1463 - page 15

 
fxsaber:
ArrayPrint - similar.
Here is an example https://www.mql5.com/ru/forum/160673/page2#comment_3827986
MetaEditor build 1467
MetaEditor build 1467
  • www.mql5.com
Объясните, почему вот этот текст, отформатированный исключительно пробелами, нет ни одного -tab-,: после применения стилизатора, преобразуется в та...
 
Rashid Umarov:
Here is an example https://www.mql5.com/ru/forum/160673/page2#comment_3827986

This is no different from what you yourself wrote above.

ArrayPrint has many more input parameters, though. The last parameter flags is of interest.

 

Generally speaking, as far as the tester hangs up. I have been able to identify several functions that cause it. The most common is Comment.

Here try to run such an indicator in the tester:

#property indicator_separate_window

int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[])
  {
   Comment("OnCalculate");
   return rates_total;
  }

Speed just not the maximum, so that the test takes some time, in the process of which hangs. True, not always - I do not understand what it depends on, whether it's mouse movements or something else. In general, you can test a few times, it should hang.

 
The ArrayPrint function will be available on the website tonight
 
Alexey Navoykov:

Generally speaking, as far as the tester hangs up. I have been able to identify several functions that cause it. The most common is Comment.

Here try to run such an indicator in the tester:

#property indicator_separate_window

int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[])
  {
   Comment("OnCalculate");
   return rates_total;
  }

Speed just not the maximum, so that the test takes some time, in the process of which hangs. True, not always - I do not understand what it depends on, whether it's mouse movements or something else. In general you can test it several times, it should hang.

With three test speeds:

  • maximum
  • maximum minus one step
  • maximum minus two steps
Log tab display in the tester is frozen, as it is considered that at such speeds the output of prints will strongly slow down the process, and it is also simply not realistic to track information on openings/closings.

In general, more precisely provide evidence of what is your "tester freeze".

Added: and more precisely describe the situation: version, build, server, symbol, timeframe, test mode...

Added: shit, my editor and tester got hung up. Tick generation mode was "All ticks".

 
Alexey Navoykov:

Generally speaking, as far as the tester hangs up. I have been able to identify several functions that cause it. The most common is Comment.

Here try to run such an indicator in the tester:

#property indicator_separate_window

int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[])
  {
   Comment("OnCalculate");
   return rates_total;
  }

Speed just not the maximum, so that the test takes some time, in the process of which hangs. True, not always - I do not understand what it depends on, whether it's mouse movements or something else. In general you can test it several times, it should hang.

What's up here:

   return rates_total;

?

 

Indeed:

//+------------------------------------------------------------------+
//|                                               Indicator_Test.mq5 |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_plots 0
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnCalculate (const int rates_total,      // размер массива price[]
                 const int prev_calculated,  // обработано баров на предыдущем вызове
                 const int begin,            // откуда начинаются значимые данные
                 const double& price[]       // массив для расчета
                 )
  {
   Comment("OnCalculate");
   return (rates_total);
  }

Testing at maximum speed, "All ticks" tick generation mode - the tester hangs up. Hanging means the following:

Hanging

If you comment out the comment line, everything is tested.

Files:
 
Vladimir Karputov:

Testing at maximum speed, "All ticks" tick generation mode - the tester hangs up.

It does not depend on speed, mode or timeframe. It may freeze in any case.

By the way, some other functions, e.g. ChartGetInteger(0, CHART_WIDTH_IN_BARS) lead also to hangs in my program. But I can't reproduce an isolated example with them. However, I think Comment will suffice.

 

What is this?

HistoryCenter   delete old files from C:\Program Files\BCS Broker MetaTrader 5 Terminal\bases\FxPro-ECN\history\EURUSD, last access time 2016.04.12 10:37
HistoryCenter   delete old files from C:\Program Files\BCS Broker MetaTrader 5 Terminal\bases\FxPro-ECN\history\GBPUSD, last access time 2016.04.12 10:37
HistoryCenter   delete old files from C:\Program Files\BCS Broker MetaTrader 5 Terminal\bases\FxPro-ECN\history\USDCHF, last access time 2016.04.12 10:37
HistoryCenter   delete old files from C:\Program Files\BCS Broker MetaTrader 5 Terminal\bases\FxPro-ECN\history\USDJPY, last access time 2016.04.12 10:37
 
fxsaber:
Please change MqlTick to
struct MqlTick
  {
   datetime     time;          // Время последнего обновления цен
   double       bid;           // Текущая цена Bid
   double       ask;           // Текущая цена Ask
   double       last;          // Текущая цена последней сделки (Last)
   ulong        volume;        // Объем для текущей цены Last
   datetime_msc time_msc;      // Время последнего обновления цен в миллисекундах
   uint         flags          // Флаги тиков
  };
I.e. introduce a new datetime_msc type.
It would be better to just make the field msc and write milliseconds (0-999) there separately.