Errors, bugs, questions - page 2557

 
Nikolai Semko:

Yes, crashing is very tough. Best not to take any chances.
It's all about memory, of course.
If you clean up memory with the help of your hands like these:

then the crash doesn't happen either. At least it didn't happen to me.
But when the TF is being changed, arrays must be automatically cleaned!

I do not understand, why should we deal with function Crash() if it doesn't do it, because it reads only information about indicators.
Perhaps, the execution of this function slows OnDeinit when changing the TF, and therefore MT5 has no time to clear the memory.
There are problems with OnDeinit asynchronous function for a long time. It is not good! The system must not crash because of asynchrony.

1) you need to truncate the sturgeon with INT_MAX(2 bn) here:

CopyTicks(_Symbol,ticks,COPY_TICKS_ALL,(TimeCurrent()-Weeks*7*24*60*60)*1000,INT_MAX);

we'll fix that from our side too.

2) all memory has to be managed in a very strict way, no GC here

3) indicator reinitialization on timeframe change is warm without physical reinitialization from scratch, so you need to free memory by yourself. especially resources on global level

4) use OOP, it will at least give you the ability to properly describe and control the resources

 

And here's a screenshot of the system loading when scrolling - the GP is almost in a dead state - why isn't it loading?


 
Aleksey Vyazmikin:

I'm talking about an FX-8350 processor and a Radeon HD 7950 graphics card. I don't get the feeling that the graphics card is loaded by the MT5.

However, it is. The graphics card has a big impact on the rendering speed as it is the one used in rendering.

Your question lacks information about the environment in which the scrolling takes place.

For example:

  • how many indicators, what type they are - the complexity of rendering is completely different
  • how many programs are on the chart
  • whether programs react to events, especially moves, mouse, etc. - they can create movement in their threads
  • scrolling to the left edge of the chart, which causes automatic paging and rebuilding of data
  • number of graphical objects in visible area and in total on the chart, including hidden ones

If the situation is stable, all data is calculated and there are no induced requests, then the video card and CPU are responsible for the load.


Since you clearly stated "jumping up to 100% on ONE core, not all cores", this is a perfectly normal situation. The computer does its job - it loads the selected core and in doing so it has CPU usage = 12.5% of all 8 cores, not 100%.

 
Renat Fatkhullin:

1) you need to truncate sturgeon here with INT_MAX(2 bln):

We will correct this too.

2) All the memory should be managed in a very strict way, there is no GC here.

3) indicator reinitialization on timeframe change is warm without physical reinitialization from scratch, so you need to free memory by yourself. especially resources on global level

4) use OOP, it will at least give you the ability to properly describe and control the resources

To continue the same topic, please look at this post - it is not clear where these ticks come from when the exchange is closed - should I contact the broker or the exchange?

Forum on trading, automated trading systems and testing trading strategies

MQL5 Own Timeframes

Aleksey Vyazmikin, 2019.09.07 09:50

I don't know what to do with them, I don't know what to do with them, and I don't know if they are right... And during clearing.



 
Aleksey Vyazmikin:

And here's a screenshot of the system load when scrolling - the GP is almost in a dead state - why isn't it being loaded?

So nothing serious is being transmitted to it this time.

And here's my test, on a completely blank screen with active scrolling: you can clearly see the load spike, it's Windows 10 in-house monitoring


 
Renat Fatkhullin:

However, it does. The graphics card has a strong influence on the rendering speed as it is the one used in rendering.

Your question lacks information about the environment in which the scrolling takes place.

For example:

  • how many indicators, what type of indicators - the rendering complexity is totally different
  • how many programs are on the chart
  • whether programs react to events, especially moves, mouse, etc - they can create movement in their threads
  • scrolling to the left edge of the chart, which causes automatic paging and rebuilding of data
  • number of graphic objects in visible area and in total on the chart, including hidden ones

If the situation is stable, all data is calculated and there are no induced requests, then the video card and CPU are responsible for the load.


Since you clearly stated "jumping up to 100% on ONE core, not all cores", this is a perfectly normal situation. The computer does its job - it loads the selected core and in doing so it has CPU usage = 12.5% of all 8 cores, not 100%.

I give information on the environment:

- Indicators are 16, rendering is not complicated, without kanvas, toolbars, and other frills - sticks/stripes - I attach a screenshot.

- No programs on the chart, I open window after optimizer, it's just as an example - work charts slow down too, but less (there are less indicators).

- No, events are not processed.

- Unlimited bar display mode is selected, i.e. paging is sort of excluded.

- There are no graphical objects, or rather I have removed all the arrows and dashes. There is one label left - it is from the indicator. I have a day off today and it should not interfere with it.

I have posted a screenshot above showing that graphics card is not engaged, is there any way to check if it is engaged or is it normal that the load is near zero and the core is loaded?

Screenshots from MetaTrader platform

Si Splice, M1, 2019.09.07

JSC ''Otkritie Broker'', MetaTrader 5, Real

Si Splice, M1, 2019.09.07, Otkritie Broker, MetaTrader 5, Real


 
Renat Fatkhullin:

So nothing serious is being transmitted to him this time.

And here's my test, on a completely blank screen while actively scrolling: you can clearly see the load spike, this is standard Windows 10 monitoring


So maybe it should, but it isn't - how do you know?

 

I seem to have explained everything in great detail and in great detail.

The computer does its job. All work costs resources and you see the consumption of those resources.

What makes you think that in your opinion resources should not be consumed - I do not understand.


I don't know exactly what GPU characteristics MSI Afterburner considers. There are a lot of characteristics out there and I'm not at all sure what the overall GPU load is, rather than some particular point.

My proof: I take it and just scroll the browser window:

The situation is exactly the same when scrolling a chart in MetaTrader 5:


The terminal's use of the graphics card is proven.

Considering the fact that I've already spent 20 years on trading terminals projects and their optimization, it's strange not to trust my words.

 
Aleksey Vyazmikin:

So maybe it should, but it isn't - how do you know?

Change the testing programme or listen to someone who is directly involved in the issue at hand.
 
Renat Fatkhullin:

I seem to have explained everything in great detail and in great detail.

The computer does its job. All work costs resources and you see the consumption of those resources.

What makes you think that in your opinion resources should not be consumed - I do not understand.


I don't know what exactly the GPU specification is judged by MSI Afterburner. There are a lot of characteristics out there and I'm not at all sure what the total load on the GPU is, rather than some particular point.

My proof: I take it and just scroll the browser window:

The situation is exactly the same when scrolling a chart in MetaTrader 5:


The terminal's use of the chart is proven.

Considering the fact that I've already spent 20 years on trading terminals projects and their optimization, it's strange not to trust my words.

It's not about trusting you! I'm just assuming that there's a problem with drivers or something, although all sorts of 3D games run.

Browser loads the video card, well not every page of course, but with video clips and something similar - I checked.

I also checked it. Then I threw all built in MT5 indicators on 40 Indexes chart and everything is scrolling very fast, core load is 20%-25%.

So the problem is in some indicator I have? I don't understand, but it is already calculated. For many years, I've been asking for some manager to implement, what would the user could see which program/indicator/script on the chart, how much CPU time it would be very convenient.

Reason: