Errors, bugs, questions - page 2081

 
Anatoli Kazharski:

This problem appears in all indicators. Including those from the standard delivery. For example, Moving Average:

//---

And after several bars are formed:

//---

Try to reproduce it in your environment. Need to see if I'm the only one with this problem.


Yes, I confirm:

Terminal        MetaTrader 5 x64 build 1687 started (MetaQuotes Software Corp.)
Terminal        Windows 10 (Build 16299), x64 based PC, IE 11.00, UAC, Intel Core i3-3120 M  @ 2.50 GHz, RAM: 4473 / 8077 Mb, HDD: 330591 / 475588 Mb, GMT+02:00
Terminal        C:\Users\barab\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075

animation:

The indicators do not shift

 
Comments not relevant to this topic have been moved to "BUY_LIMIT, ORDER_TIME_DAY".
 
Vladimir Karputov:

Yes, I confirm:

animation:

Thank you. Added a link to your message to the servicedesk application as an addendum. Need an emergency fix for this bug, all work has stopped.
 

fxsaber:

Both terminals have two tabs - Trade and Mail. I want "Trading" to be active all the time. But when an internal email (e.g. partial filll) from the broker arrives, the tab switches to "Mail".

How do I turn this real nasty thing off? Well, there should not be such an intrusive notification, and moreover to absolutely ordinary broker's emails, where he automatically informs about order execution dozens of times in a day. I don't understand why sometimes it switches to "Mail" and sometimes it doesn't.

How can I turn it off? I never read the "E-Mail" tab, as it is Spam. To put it mildly, it's annoying to see the terminal GUI react like this to Spam.


I think that I can use WinApi to implement a function to switch to the desired tab: trade, balance, whatever.
Try to implement it yourself, or order it from freelancers, I hope there are still skilled people there.

 
Sergey Dzyublik:

I think that by using WinApi, you can implement a function to switch to the desired tab: trade, balance, whatever.
Try to implement it yourself, or order it from Freelancer, I hope there are still skilled people there.

I've practised this perversion myself. I want a user-friendly GUI.

 
Aleksey Vyazmikin:

He's out of memory again...

Even though there's still 7 gigabytes of RAM available. What the hell is this?

Open a ticket with Service Desk. Include the expert and the optimization settings.

+ describe the operating system, bit rate, system configuration.

 
Alexey Da:

Open a ticket with Service Desk. Attach the expert and optimisation settings.

+ describe operating system, bit rate, system configuration.


I don't know how to reproduce all this - last week this message appeared every day, and the EA did not work at all. And the other day with optimisation... then everything worked after closing all the programs.

Can it be a conflict between programs? I noticed that the bug was always there when the Opera browser was open.

 

In this thread I found out an interesting thing about the performance of the Comment() command in MT4 and MT5. In MT5 this command runs ~2000 times (!!!) slower than in MT4.

Here is the test code that runs on the two platforms:

#property script_show_inputs
#include <Canvas\Canvas.mqh>

input uint   FontSize=12;                                   // размер шрифта
input uint   Count=1000;                                    // размерность цикла
input ENUM_COLOR_FORMAT format=COLOR_FORMAT_ARGB_NORMALIZE; //Способ обработки цвета

void OnStart()
  {
   CCanvas Text;
   ulong ColorScreen=ChartGetInteger(0,CHART_COLOR_BACKGROUND,0);

   Text.FontSet("Arial",FontSize);
   string str="Необходимо подождать.Выполняется проход цикла №: = ";
   int H=Text.TextHeight(str);
   int W=Text.TextWidth(str+"00000");
   if(!Text.CreateBitmapLabel(0,0,"FONT",2,130,W,H,format)) Print("Error creating canvas: ",GetLastError());

   ulong t1=1,t2=1,t0;
   uint j=0;
   color clr=(color)ARGB(255,255^GETRGBR(ColorScreen),255^GETRGBG(ColorScreen),255^GETRGBB(ColorScreen));
   t0=GetMicrosecondCount();
   for(j=0;j<Count;j++)
     {
      Comment(str+IntegerToString(j));
      if (IsStopped()) break;
     }
   t1=GetMicrosecondCount()-t0;

   t0=GetMicrosecondCount();
   for( j=0;j<Count;j++)
     {
      Text.Erase((color)ColorScreen);
      Text.TextOut(0,0,str+IntegerToString(j),clr);
      Text.Update();
      if (IsStopped()) break;
     }
   t2=GetMicrosecondCount()-t0;
      Text.Erase((color)ColorScreen);
      Text.TextOut(0,0,"Время Comment = "+IntegerToString(t1)+" Время Canvas = "+IntegerToString(t2),clr);
      Text.Update();
      Sleep(30000);
     
   Text.Destroy();
   Comment("");
  }
//+------------------------------------------------------------------+

Is this OK?

Files:
 
Nikolai Semko:

In this thread I found out an interesting thing about the performance of the Comment() command in MT4 and MT5. In MT5 this command runs ~2000 times (!!!) slower than in MT4.

Here is the testing code that runs on the two platforms:

Is that OK?

Yes, that's right and correct.

In MT4, the Comment function simply changes the internal comment text box without trying to display it on the chart. That is, the comment will show up sometime in the next regular chart rendering, but changing the comment itself doesn't cause the chart to redraw. If you change the comment quickly, its change will not be visible in the chart.

In MT5 the Comment function will explicitly cause re-drawing of the chart, because the priority is given to displaying the comment in the chart. Otherwise, the function is useless.

That's exactly the difference.


If in MT4 you put ChartRedraw() forcibly after calling Comment, the behavior will still not be the same as in MT5. ChartRedraw() in Metatrader 4 ignores the comment value and decides for itself whether the chart should be updated from the last frame or not. Of course, in the absence of hundreds of quotes per second which would cause a disabling of chart data, ChartRedraw decides "why draw an unchanged chart" and skips drawing the frame.

Metatrader 5 also has the same system, but there are many more cases where unconditional drawing is given priority.

Terminals are graphical applications and can provide hundreds of frames per second and run in economical display mode for the sake of performance.


Hence additional conclusions when running benchmarks:

  • one cannot consider a ChartRedraw call to be a real ChartRedraw

  • you must always know and prove statements "why a chart will be redrawn" and "do I invalidate the internal picture of the market, so that the terminal decides to redraw the chart".

  • you should not make multiple conclusions in MT5 during the benchmarks, you should always think about how you are affecting the rendering

  • MT5 has a more correct system of changing objects on the chart and it is necessary to clearly understand the consequences of read/write commands mixing
    it is recommended not to mix read/write commands, and to do mass read and mass write separately.

  • frequent redrawing of charts in benchmarks leads to a high dependency of the results on the graphics card.
    in fact, some tests may end up testing the graphics card rather than the algorithms or functions. the test on a laptop and a desktop computer may show multiple times different results simply because of a 3-5 times slower graphics card

These mistakes are made all the time by everyone.

 
Renat Fatkhullin:

Yes, that's right and correct.

Thank you very much for the detailed answer. That's pretty much what I thought. It all makes sense.

Reason: