Errors, bugs, questions - page 2763

 

Why is the result of the script 1-2 seconds in the report, but more than a minute?

#include <(MyLib)\CGraphicObjects\CMyButton.mqh>CMyButton but;

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnStart()
  {
   Print("Начали");
// ===================================================================
   int total = 10000;
   for(int i = 0; i < total; i++)
      but.Create("Push" + (string)i, 32, 32, 30, 30);
// ===================================================================
   ulong mass[100];
   ArrayInitialize(mass, 0);
// ===================================================================
   for(int k = 0; k < 100; k++)
     {

      ulong  start = GetMicrosecondCount();

      for(int i = 0; i < total; i++)
         color col = but.ColorBG();

      mass[k] = GetMicrosecondCount() - start;
     }
// ===================================================================
   Print("Массив");
   ulong rez = 0;
   for(int i = 0; i < 100; i++)
      rez += mass[i];

   Print("Старый способ Итог: " + IntegerToString(rez / 100)+" Sec "+ IntegerToString(rez / 100/1000000));

  }
//+------------------------------------------------------------------+

The script worked and from start to unloading it takes about a minute or more.

But the script stubbornly writes that it worked for 1 - 2 seconds, what can slow PC down so much ?

2020.06.01 11:34:26.680 Teste speed (EURUSD,M15) Start

2020.06.01 11:37:34.067 Teste speed (EURUSD,M15)

2020.06.01 11:37:34.067 Teste speed (EURUSD,M15) Oldest way Total: 1870971ms Sec 1

2020.06.01 11:39:32.283 Teste speed (EURUSD,M15)

2020.06.01 11:42:24.664 Teste speed (EURUSD,M15) Array

2020.06.01 11:42:24.664 Teste speed (EURUSD,M15) Old way Totals: 1652839ms Sec 1


 
Vladimir Pastushak:

Why is the result of the script 1-2 seconds in the report, but more than a minute?

The script worked and from start to unloading it takes about a minute or more.

But the script stubbornly writes that it worked for 1 - 2 seconds, what can slow PC down so much ?

2020.06.01 11:34:26.680 Teste speed (EURUSD,M15) Start

2020.06.01 11:37:34.067 Teste speed (EURUSD,M15)

2020.06.01 11:37:34.067 Teste speed (EURUSD,M15) Oldest way Total: 1870971ms Sec 1

2020.06.01 11:39:32.283 Teste speed (EURUSD,M15)

2020.06.01 11:42:24.664 Teste speed (EURUSD,M15)

2020.06.01 11:42:24.664 Teste speed (EURUSD,M15) Old way Total: 1652839ms Sec 1


Because it prints the time of one loop iteration, not the script running time.

 
Developers, do something about the trades on the chart already. When there are a lot of them, you just can't see the chart, you have to delete it every time with a new deal.
 
Alexey Viktorov:

Because it prints the time per loop iteration, not the running time of the script.

The script processes 10,000 objects in a loop 100 times, for a total of 1,000,000

I use mass[k] to record the time of each pass of the loop

then calculate the average pass

ulong rez = 0;

for(int i = 0; i < 100; i++)

rez += mass[i];

rez /100

You must have not looked closely at the script

 
Does anyone have a link to the build 2470 archive? My MT doesn't want to update - it says there's a new build, creates an empty liveupdate/temp folder in "roaming", but then the error "download 'MT5CLW64' failed" in the log. Usually google drive from Andrey Khatimlianskii comes to the rescue ;-), but so far there's only 2460.
 

What the hell is this?

2020.06.01 12:20:03.695 Ticks 'BR-7.20' container read error [The operation completed successfully. (0)

And in general, there's some bug with CopyTicks in last version.

 
Dmitriy Skub:

And in general, in last version there is some mistake with CopyTicks.

Before calculations I always load all ticks, which were missed since last calculations, via CopyTicksRange. I haven't noticed any problems.

 
fxsaber:

Before calculations, I always load up all ticks that have been missed since the last calculation, using CopyTicksRange. I haven't noticed any problems.

Did they change anything in CopyTicks call formats or any flags?

EA started to hang, which was quietly copying the ticks to a file in real time for the last 5 years.

 
Dmitriy Skub:

They didn't change anything in CopyTicks call formats or any flags there ?

I switched to CopyTicksRange a long time ago. With it the flight is normal.

 

In build 2470, if we learn the indicator Handle from the indicator itself, it is then impossible to delete the indicator.

The indicator is removed from the list of running indicators, but works in the background.

OnDeinit is not called.