Errors, bugs, questions - page 2240

 
A100:
Moreover, you are not an ordinary user, but your works are used by many, many people.

I would put it this way:

When reading a file, this error can occur 1 time in 100 reads (reading a file, for example, at 10 times per second)

Moreover, such an error occurs, then vanishes and the Expert Advisor continues working.

 
Vladislav Andruschenko:

I would put it this way:

When reading a file, this error can occur 1 time in 100 reads (reading a file, for example, at 10 times per second)

And this error occurs, then vanishes and the Expert Advisor keeps working.

In this regard, there is a simple and honest proposal to developers: take a computer in that configuration(*), which is specified as the minimum system requirements for MetaTrader, and use it for testing (including ServiceDesk)

(*) Compared to this configuration my tablet is a meteor and there is nothing loaded except MetaTrader

 
A100:

In this connection there is a simple and honest proposal to the Developers: take a computer in that configuration(*), which is specified as the minimum requirements for MetaTrader and conduct tests on it (including in ServiceDesk)

(*) my tablet is a meteor compared to this configuration


maybe it comes to brakes (even my not weak one is already 90% loaded) and then this error occurs? as you showed in the explanation above?

Thanks for the referral, I will try to find out.

 
A100:

So on request #1530548 ServiceDesk cannot reproduce error https://www.mql5.com/ru/forum/1111/page1628#comment_2702870 even though I have steady playback even now (in build 1881). With a bit of thought I figured out why! The answer is: because I have a slow computer (tablet)

Similar situation was in application #1952509 on this problem https://www.mql5.com/ru/forum/1111/page2124#comment_6518537

ServiceDesk also reported at first that it couldn't reproduce the error. It took me a lot of effort to convince myself that there was an error after all... in the end:

Support Team 2018.02.10 22:35
Seems to have reproduced your problem back on Friday on a weak machine with 39 charts.
Will keep an eye on it. Will request additional data if required. Thanks.

This raises the question: Is it necessary to bother with such errors at all? Or just let them live their lives in peace ... maybe they won't pop up again - it's enough to have a fast computer, right?

These questions arise in the context that a dozen other charts with several EAs/indicators may turn a fast computer into a slow one (and an average trader uses exactly a lot of EAs - for example https://www.mql5.com/ru/forum/267154/page5#comment_8164924 - 82 EAs are running)... Or even a slow computer may become slow for a short time due to other circumstances (antivirus... other programs... or the system itself has temporarily taken over almost all resources).

And then exactly that unexplained 1 in 100 failure will happen (and by the laws of nature it naturally occurs at the most inopportune time).

What's the problem with transferring the working strategy outside of MT5 leaving MT5 as the connector? i think to spend time on such dances is ok, if the strategy is good, and not as usual ))

 
Konstantin:

What's the problem with moving the working strategy out of MT5 leaving MT5 as the connector? I think it's ok to spend time on this kind of dancing if the strategy is worthwhile and not as usual ))

The problem is the organization of full-fledged feedback ... and even the connectors sometimes need to open the files themselves
 

Can someone explain why in MQL5 the time series time[] does not correspond to the server time?

here is the indicator that calculates the shift of closing prices relative to the beginning of the day:

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_plots   1
//--- plot Label1
#property indicator_label1  "Label1"
#property indicator_type1   DRAW_LINE
#property indicator_color1  clrRed
#property indicator_style1  STYLE_SOLID
#property indicator_width1  2
//--- indicator buffers
double         DB[];

static int lastdayclose=-1;
static double F0=1.0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   SetIndexBuffer(0,DB,INDICATOR_DATA);
   lastdayclose=-1;
   F0=1;
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   int i,limit;
   MqlDateTime tmpdate;
   if(prev_calculated==0)
     {
      limit=rates_total-1;
      lastdayclose=-1;
      F0=1;
     }
   else limit=rates_total-prev_calculated;
   ArraySetAsSeries(time,true);
   ArraySetAsSeries(close,true);
   for(i=limit;i>=0;i--)
     {
      TimeToStruct(time[i],tmpdate);
      if(tmpdate.day!=lastdayclose)
        {
         F0=close[i];
         lastdayclose=tmpdate.day;
        }
      DB[i]=F0-close[i];
     }
   return(rates_total);
  }
//+------------------------------------------------------------------+

the indicator is drawn:

https://www.mql5.com/ru/charts/8940511/eurusd-m5-alpari-international-limited

you can see that the time of the beginning of the day is shifted to the left by 2 hours

 
Igor Makanu:

you can see that the start of the day is shifted to the left by 2 hours

Can you see where?

Screenshots of the MetaTrader trading platform

EURUSD, M5, 2018.07.25

Alpari International Limited, MetaTrader 5, Demo

EURUSD, M5, 2018.07.25, Alpari International Limited, MetaTrader 5, Demo


 
Alexey Viktorov:

See where?

do you see the period separator lines? - it is the beginning of the day, it corresponds to the server time 0:00

is the logic of the indicator clear? - vertical splashes of the red line is the closing price of the first bar at the beginning of the day, we memorize it and then draw the increment of closing prices relative to the first bar closing price at the day opening - this "red spike" should be on the period separator line, i.e. at the beginning of the day

 
A100:
The problem is organizing full-fledged feedback... and even connectors sometimes need to open the files themselves

Why do the connectors need to open the files themselves, if all the logic is outside, call the required functionality from OnInit in an external program to initialise

 
Igor Makanu:

do you see the period separator lines? - it is the beginning of the day, it corresponds to the server time 0:00

is the logic of the indicator clear? - vertical splashes of the red line is the closing price of the first bar at the beginning of the day, we memorize it and then draw the increments of closing prices relative to the closing price of the first bar at the opening of the day - this "red spike" must be on the separator line, i.e. at the beginning of the day

Do you think we can judge about something based on that? Yes...

Reason: