MetaTrader 4 and MetaTrader 5 Memory and Data Loading Management Comparison - page 3

 
Alain Verleyen:

After all years here, you still don't know connecting to Metaquotes-Demo will update your terminal to last beta ? Please be serious. Of course I know and I agree it's confusing, but it's well known behaviour.

If you don't want problem (or at least less problems) never connect to Metaquotes server, always to an actual broker and use the last official release (1940 or eventually 1881 which is the previous one).

EDIT: I also absolutely don't care about MT4 vs MT5 match, I am using both and they have their owns strengths and weaknesses. What I care about is a scientific approach of software and programming, and I don't find it in this thread at all.

You understand words compatible ?

Good way of comparing MT4 and MT5 is building one source code to test both.

This way you compare apple to apple.

If you have two different source code respectively for MT4 and MT5, then you never compare them apple to apple.

Especially if the code gets longer there is a chance that you put bug in one source code and no bug in the other source code, and many other possibilities of comparing apple to pear. 

Many of us experience freeze with MT5. As i have shown, that happen with initial memory burst at start of indicator.

In my screenshot i was lucky to hold under 3 GB ram usage. I bearly managed to wait another five minutes to settle down. It come down to 600 MB ram uasage.

Some of you with less memory would experience crash or freeze or your mouse is not responding in this case with MT5.

The description and screenshot in this post is helpful to look at for future work to improve stability of MT5.

You can not alone just pretend that MT5 never crashes or the crash of MT5 is all our fault of having low spec computer etc.

When there is instability it does not matter how high or low spec computer you have. You get crashed because memory is kept allocated exponentially and not cleaned properly. 

In this case, even average user without knowledge of coding can tell that there is some speed reduction or slow down in MT5.

As I have mentioned this is how many of us feel with MT5 at the moment. This is the most important scientific data we present here, the user's experience.

I wrote this post because I am waiting this instability issues (memory problem) to clear up in MT5 as soon as possible.






 
Young Ho Seo:

You understand words compatible ?

Good way of comparing MT4 and MT5 is building one source code to test both.

This way you compare apple to apple.

If you have two different source code respectively for MT4 and MT5, then you never compare them apple to apple.

Especially if the code gets longer there is a chance that you put bug in one source code and no bug in the other source code, and many other possibilities of comparing apple to pear. 

Many of us experience freeze with MT5. As i have shown, that happen with initial memory burst at start of indicator.

In my screenshot i was lucky to hold under 3 GB ram usage. I bearly managed to wait another five minutes to settle down. It come down to 600 MB ram uasage.

Some of you with less memory would experience crash or freeze or your mouse is not responding in this case with MT5.

The description and screenshot in this post is helpful to look at for future work to improve stability of MT5.

You can not alone just pretend that MT5 never crashes or the crash of MT5 is all our fault of having low spec computer etc.

When there is instability it does not matter how high or low spec computer you have. You get crashed because memory is kept allocated exponentially and not cleaned properly. 

In this case, even average user without knowledge of coding can tell that there is some speed reduction or slow down in MT5.

As I have mentioned this is how many of us feel with MT5 at the moment. This is the most important scientific data we present here, the user's experience.

I wrote this post because I am waiting this instability issues (memory problem) to clear up in MT5 as soon as possible.

Again only words.

  • You are working with beta version and you talk about it as if it was a release. (Your screenshot means nothing without the information needed to reproduce them).
  • User experience is scientific data, seriously ?
  • I already said you there are a LOT of differences between MT4 and MT5. Didn't you see it after years working with both ?

I am fed up with people complaints and whining when they don't even understand what they are talking about.

"I am waiting..." then just wait the others to do the job and keep your useless posts.

 
Alain Verleyen:

Again only words.

  • You are working with beta version and you talk about it as if it was a release. (Your screenshot means nothing without the information needed to reproduce them).
  • User experience is scientific data, seriously ?
  • I already said you there are a LOT of differences between MT4 and MT5. Didn't you see it after years working with both ?
  • I have seen your products, and I can only suggest you to improve your coding skills.

I am fed up with people complaints and whining when they don't even understand what they are talking about.

"I am waiting..." then just wait the others to do the job and keep your useless posts.

Do you really understand the word compatible? Is the word compatible means angry to you?

Ask yourself why they created compatible language between MQL5 and MQL4?

What is the point if the compatible languages does not work in one platform and works in the other? 

Do we call this as compatible? Compatible is compatible.

Native MQL4 language does not work in Metatrader 5. MQL5 language works on both. Hence what I used is rather native MQL5 language to compare the both platform.

It showed that Native MQL5 language works better in MetaTrader 4 than MetaTrader 5 then how this can be explained ?

That is MetaTrader 4 has stability but Metatrader 5 has less stability.

I did not say that is bug or error but it is instability what users feel slow and freeze due to limited or poor memory management? Not only this beta version but this is what I felt many years to work with MT5.

The fact the code runs well in MetaTrader 4 means that it makes a lot easier for developer side.

This is what MetaTrader 5 need to catch up with MetaTrader 4. That is my clear point through this post.

I have started coding even before MetaTrader 4 was established. Then I coded when MetaTrader 4 first released. I love MetaTrader and the community. I am the oldest developer in the community. 

Hence I reject your rating on my coding skills and others. Since it seems you do not know what you are talking about at all. LOL

When things are going in the wrong direction there must be someone to point out.

It is for MetaTrader and community. There are many rivals growing like ctrader and tradingview etc. So we got to take the right path.

I never seen your coding skills rather than yelling with some unnecessary points in the forum. LOL

Please talk about the topic only instead of yelling. Then people will take your points better.







 

Young Ho Seo:

...
If you really want to improve things, attach a code which allow to reproduce the screenshots of your first post. Why is it that hard ? If you do it I will reproduce the issue and report it directly to Metaquotes, we will help to fix bugs directly instead of "waiting..."
 
Young Ho Seo:

...

It's a topic about a problem with an MT5 beta version, right ? How do you think problems (bugs or weaknesses) are fixed ?

I agree to stop discussing about coding skills, no problem (I have edited my posts and remove any reference to skills, please do the same). But you talked about a problem, so it's to you to give all needed information to reproduce it, don't you agree ? It's not to me to prove anything or to provide code.

If there is a bug in current beta, I want it to be fixed, I don't encounter this bug up to now, so I am asking you more information. 25 posts already.

What is the goal of this post if not help to fix problems ?

 
For those who just join the thread you're attending to a titan duel. 
On one side Alain whose skills make no doubt for no one here around, and on the other side Young, discreet on the forum but only its application of harmonic patterns is enough to make the average coder dizzy.
 
Alain Verleyen:

It's a topic about a problem with an MT5 beta version, right ? How do you think problems (bugs or weaknesses) are fixed ?

I agree to stop discussing about coding skills, no problem (I have edited my posts and remove any reference on skills, please do the same). But you talked about a problem, so it's to you to give all needed information to reproduce it, don't you agree ? It's not to me to prove anything or to provide code.

If there is a bug in current beta, I want it to be fixed, I don't encounter this bug up to now, so I am asking you more information. 25 posts already.

What is the goal of this post if not help to fix problems ?


This is somewhat simplied problem cut out from long piece of source code. But you will see the behaviour enough.

Why many of us feel easy to use with MetaTrader 4 up until these days.


The problem stays with previous version of MetaTrader 5 too.


MetaTrader 4 uses well less than 100 MB memory from beginning to an end.

MetaTrader 5 uses something like over 1000 to 2000 MB memory initially and then it drops to 350 MB something in My computer.

Try both with case of static array and dynamic array. Must use Task Manager or other memory watcher.

Often get crashed so I have to close MetaTrader 5 forcibly too from task manager.


Findings 1, MetaTrader 5 uses 3 to 4 times more memory than MetaTrader 4.

Findings 2, MetaTrader 5 have the initial fluctuation in memory which is really heavy (near freeze) whereas MetaTrader 4 is calm at start and till end.


Steps to test

1.  open MetaTrader 5

2. open one chart.

3. attach test.ex4 to chart. (check how initial memory fluctuates and see how it is settled.)

 

#property strict
#property indicator_chart_window



//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
{
    EventSetTimer(10);
     
    return(INIT_SUCCEEDED);
}





void OnDeinit(const int reason)
{
   Comment("");
   ChartRedraw(0);

   
   EventKillTimer();
}




int cnt = 0;

void OnTimer()
{

    GetPriceChange(cnt);
    
    cnt = cnt + 1;
    
}





//+------------------------------------------------------------------+
//| 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[])
{
    return(rates_total);
}



//Test with dynamic array and increase array length. 
void GetPriceChange(int c)
{

    Comment("Testing progress...");
    
    MqlRates rateM1[500];
    MqlRates rateM5[500];
    MqlRates rateM15[500];
    MqlRates rateM30[500];
    MqlRates rateH1[500];
    MqlRates rateH4[500];
    MqlRates rateD1[500];
    MqlRates rateW1[500];
    MqlRates rateMN1[500];
    
    int size = 500;
    int mSymboNumber = SymbolsTotal(true);
 
    
    for(int i = 0; i < mSymboNumber; i++)
    {
    
       string symbol = SymbolName(i, true);
       
       int copiedM1=CopyRates(symbol, PERIOD_M1,0,size,rateM1);
       int copiedM5=CopyRates(symbol, PERIOD_M5,0,size,rateM5);
       int copiedM15=CopyRates(symbol, PERIOD_M15,0,size,rateM15);
       int copiedM30=CopyRates(symbol, PERIOD_M30,0,size,rateM30);
       int copiedH1=CopyRates(symbol, PERIOD_H1,0,size,rateH1);
       int copiedH4=CopyRates(symbol, PERIOD_H4,0,size,rateH4);
       int copiedD1=CopyRates(symbol, PERIOD_D1,0,size,rateD1);
       int copiedW1=CopyRates(symbol, PERIOD_W1,0,size,rateW1);
       int copiedMN1=CopyRates(symbol, PERIOD_MN1,0,size,rateMN1);
       
       printf("Counter: %d, Symbol: %s, M1: %d, M5: %d, M15: %d, M30: %d, H1: %d, H4: %d, D1: %d, W1: %d, MN1: %d", c, symbol, copiedM1, copiedM5, copiedM15, copiedM30, copiedH1, copiedH4, copiedD1, copiedW1, copiedMN1); 
    }
    

}



 
Young Ho Seo:


This is somewhat simplied problem cut out from long piece of source code. But you will see the behaviour enough.

Why many of us feel easy to use with MetaTrader 4 up until these days.


The problem stays with previous version of MetaTrader 5 too.


MetaTrader 4 uses well less than 100 MB memory from beginning to an end.

MetaTrader 5 uses something like over 1000 to 2000 MB memory initially and then it drops to 350 MB something in My computer.

Try both with case of static array and dynamic array. Must use Task Manager or other memory watcher.

Often get crashed so I have to close MetaTrader 5 forcibly too from task manager.


Findings 1, MetaTrader 5 uses 3 to 4 times more memory than MetaTrader 4.

Findings 2, MetaTrader 5 have the initial fluctuation in memory which is really heavy whereas MetaTrader 4 is calm at start.


Steps to test

1.  open MetaTrader 5

2. open one chart.

3. attach test.ex4 to chart. (check how initial memory fluctuates and see how it is settled.)

 

Finally something constructive, thanks. Trying it...

Which build did you use, still 1958 ? (1959 is now available).

How much symbols in your Market Watch ?

 
Young Ho Seo:


This is somewhat simplied problem cut out from long piece of source code. But you will see the behaviour enough.

Why many of us feel easy to use with MetaTrader 4 up until these days.


The problem stays with previous version of MetaTrader 5 too.


MetaTrader 4 uses well less than 100 MB memory from beginning to an end.

MetaTrader 5 uses something like over 1000 to 2000 MB memory initially and then it drops to 350 MB something in My computer.

Try both with case of static array and dynamic array. Must use Task Manager or other memory watcher.

Often get crashed so I have to close MetaTrader 5 forcibly too from task manager.


Findings 1, MetaTrader 5 uses 3 to 4 times more memory than MetaTrader 4.

Findings 2, MetaTrader 5 have the initial fluctuation in memory which is really heavy (near freeze) whereas MetaTrader 4 is calm at start and till end.


Steps to test

1.  open MetaTrader 5

2. open one chart.

3. attach test.ex4 to chart. (check how initial memory fluctuates and see how it is settled.)

 

Most likely the problem comes from the historical data?  MT4  needs only  M1 bars in order to create all other timeframes. MT5 is using the real tick data to create all time frames.  The processing of tick data takes more time and more resources.

 
Alain Verleyen:

Finally something constructive, thanks. Trying it...

Which build did you use, still 1958 ? (1959 is now available).


As Tsvetan Tsvetanov pointed out in his first post, this is more likely the architecture level of problem.

I doubt it will be fixed any soon. Myself and many of us saw the same problem last few years.

Reason: