MetaTrader 5 Platform Update Build 6090: General Improvements - page 7

 
Dadas #:
However, I don't understand how checking if an object exists and recreating it if it doesn't, is a costly problem?

https://www.mql5.com/en/docs/objects/objectfind

The function uses a synchronous call, which means that the function waits for the execution of all commands that have been enqueued for this chart prior to its call, that is why this function can be time consuming. This feature should be taken into account when working with a large number of objects on a chart.

When an object is renamed, two events are formed simultaneously. These events can be handled in an Expert Advisor or indicator by the OnChartEvent() function:

  • an event of deletion of an object with the old name;
  • an event of creation of an object with a new name.
 
Dadas #:
Same goes for the SELECTED case.

https://www.mql5.com/en/docs/objects/objectgetinteger

The function uses a synchronous call, which means that the function waits for the execution of all commands that have been enqueued for this chart prior to its call, that is why this function can be time consuming. This feature should be taken into account when working with a large number of objects on a chart.

 
Vladislav Boyko #:

So, the conclusion must be that it is necessarily the case that MT5 is flawed!
And, there are very few objects created by my indicators, very few...

The way MT5 executes these commands is simply not optimal for the performance of the platform.
Therefore, the other users who said this, were correct!
And, I understand - Meta Quotes isn't going to do anything about this...

At least now it's clear, Thank You!

 
Vladislav Boyko #:
About the event of deletion:
If the object was deleted manually, yes.
Does that also work if the object was somehow deleted otherwise, like an error caused the deletion?
 
Dadas #:

So, the conclusion must be that it is necessarily the case that MT5 is flawed!
And, there are very few objects created by my indicators, very few...

The way MT5 executes these commands is simply not optimal for the performance of the platform.
Therefore, the other users who said this, were correct!
And, I understand - Meta Quotes isn't going to do anything about this...

At least now it's clear, Thank You!

It's not flawed, it's a feature ! MT5 is not MT4, repeat with me : MT5 is not MT4 !

Either you do the needed efforts to understand it and so to benefit from it, or you keep repeating it's flawed. Your call.

What I can say you is MT5, well understood and used, is around 10 times faster than MT4 while working with heavy indicators (multi-symbols, timeframes).

 
Alain Verleyen #:

It's not flawed, it's a feature ! MT5 is not MT4, repeat with me : MT5 is not MT4 !

Either you do the needed efforts to understand it and so to benefit from it, or you keep repeating it's flawed. Your call.

What I can say you is MT5, well understood and used, is around 10 times faster than MT4 while working with heavy indicators (multi-symbols, timeframes).

Like I said: I am greatful for your time and efforts, but I will not allow You to yell at me!!!
I am not some random youngster you can yell at!!!
I came here with pure intents, not to experience another A-Hole trying to educate me!
I don't know everything, I am always learning, even at my 66 y.o. age...
And I am just a self-thaught amateur coder.

If I told you that your 100K car is stopping every 10 km because the overheating is its feature, but if you well uderstood and used..., you would laugh at me!
 
Dadas #:
Like I said: I am greatful for your time and efforts, but I will not allow You to yell at me!!!
I am not some random youngster you can yell at!!!
I came here with pure intents, not to experience another A-Hole trying to educate me!
I don't know everything, I am always learning, even at my 66 y.o. age...
And I am just a self-thaught amateur coder.

If I told you that your 100K car is stopping every 10 km because the overheating is its feature, but if you well uderstood and used..., you would laugh at me!

Unacceptable language. Banned 1 month.

It will give you the needed time to learn how to drive your 100K car, but maybe you will prefer to repeat it doesn't work as well as you old 10K one.

 
Vladislav Boyko #:
the function waits for the execution of all commands that have been enqueued for this chart prior to its call

That doesn't explain why it takes seconds -- an eternity for CPU -- to complete enqueued commands. Even with thousands of graphic objects it shouldn't take more than few miliseconds to complete.

It also does not explain why EA is causing chart to be totally unresponsive until the EA is terminated -- indicators keep working without EA running on the chart.

And all this happens with CPU running at fraction of its capacity, so that is not an issue.

 
rkdius #:
Even with thousands of graphic objects it shouldn't take more than few miliseconds to complete.

Oh really? Excessive chart objects are some of the most burdensome elements of MQL5. That's a fact widely known by users who have experienced lags and freeze-ups.

Code a simple historic line study as an object instead of an indicator buffer and watch what happens.