Errors, bugs, questions - page 1849

 
fxsaber:
Dear developers, how do you get rid of Warnings in this situation?

How about this:

template <typename T>
T GetValue()
{
  T Res = NULL;
  
  return(Res);
}
 
Konstantin:

and if you do it like this:
it would be a bummer.
 

build updated to 1580

https://www.mql5.com/ru/forum/43553/page19#comment_4844870

Wine problem solved. thanks.

Свои символы и свои датафиды в Метатрейдер 5
Свои символы и свои датафиды в Метатрейдер 5
  • www.mql5.com
Свои символы и свои датафиды в Метатрейдер 5.
 
fxsaber:

MT5 1578 - always crashes.

MT5 1571 and MT4 1065 - works without any problems. Crash script herehttps://www.mql5.com/ru/code/16280

1580 - OK.
 

MT5 loses MT4 on time of access to data by 6-10 times!

MT4

2017.04.11 07:45:57.495 время копирования буфера EURUSD,M15: uninit reason 0
2017.04.11 07:45:57.495 время копирования буфера EURUSD,M15: общее время = 1397
2017.04.11 07:45:57.495 время копирования буфера EURUSD,M15: проход = 99  время= 6
2017.04.11 07:45:57.495 время копирования буфера EURUSD,M15: проход = 98  время= 6
2017.04.11 07:45:57.495 время копирования буфера EURUSD,M15: проход = 97  время= 6
2017.04.11 07:45:57.494 время копирования буфера EURUSD,M15: проход = 2  время= 7
2017.04.11 07:45:57.494 время копирования буфера EURUSD,M15: проход = 1  время= 18
2017.04.11 07:45:57.494 время копирования буфера EURUSD,M15: проход = 0  время= 36
2017.04.11 07:45:57.493 время копирования буфера EURUSD,M15: initialized

MT5

2017.04.11 07:46:22.908 время копирования буфера (AGRX,D1)      проход = 0  время= 83
2017.04.11 07:46:22.908 время копирования буфера (AGRX,D1)      проход = 1  время= 106
2017.04.11 07:46:22.909 время копирования буфера (AGRX,D1)      проход = 2  время= 69
2017.04.11 07:46:22.909 время копирования буфера (AGRX,D1)      проход = 3  время= 41
2017.04.11 07:46:22.923 время копирования буфера (AGRX,D1)      проход = 97  время= 42
2017.04.11 07:46:22.923 время копирования буфера (AGRX,D1)      проход = 98  время= 46
2017.04.11 07:46:22.923 время копирования буфера (AGRX,D1)      проход = 99  время= 40
2017.04.11 07:46:22.923 время копирования буфера (AGRX,D1)      общее время = 15406

Check script can be compiled in both MT5 and MT4

#property script_show_inputs
input string Pair="EURUSD";
ulong StartTime,FinishTime;
ulong StartTime1,FinishTime1;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   StartTime1=GetMicrosecondCount();
   double buf[];
   ArrayResize(buf,1000);
   for ( int i=0; i<100; i++ )
   {
      StartTime = GetMicrosecondCount();
      CopyClose(Pair,0,1,1000,buf);
      FinishTime = GetMicrosecondCount();
      Print("проход = ",i,"  время= ",FinishTime-StartTime);
    //  Sleep(5000);
   }   
   FinishTime1=GetMicrosecondCount();
   Print("общее время = ",FinishTime1-StartTime1);
  }
//+------------------------------------------------------------------+
 
kaus_bonus:

MT5 loses MT4 in terms of data access time by a factor of 6-10?!

It's not - I checked.
 
fxsaber:
EA for the tester (Metaquotes-Demo)

Result

Limit sliding on the exchange symbol - BAG!

Slippage of the limit order in the exchange market is normal:

Suppose the current market is 114300 / 114280

You place a buy limit order of 114250. Someone in the market has decided to sell at a guaranteed price (not worse than the price specified in the order) and set a sell limit of 114200. As a result, all buy limit orders in the range from the market to 114200 have been collected.

This is quite normal in the stock market.
 
MQ Alexander:

Limit order slippage is normal in the stock market:

Brought our discussion (for convenience)here.
 
fxsaber:
It's not - I checked.


Thanks. i checked on two computers and wine 1.6 and 2.4. now i checked on win xp, no difference between mt4 and mt5.

 

Can anyone suggest a solution to the Copy functions...

There are no bars inside auctions on MOEX stock section, but Copy functions... These time ranges are included as bars, i.e. if we order one-hour bars for several days, the time-series array will include bars 09:00:00. I don't want to take chunks of time-series and then splice them together, maybe there is another solution?

Reason: