My approach. The core is the engine. - page 125
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
So they are redrawn exactly as you said.
And the load on the processor comes from the animation:
There is a constant re-initialization of the values in the pixel array. Every 16 milliseconds. This loads the processor up to 40%.
I was trying to figure out what exactly the load is. I thought it was saving a resource or reading it. It turned out that it was the reinitialization of the array in the drawing loop.
It also turned out that a constant call of ObjectSetInteger(0, "MT object",OBJPROP_SELECTED,1); (every 16 ms) also loads the processor. By about 10%.
I use this call to tell another EA to read the resource with animation data.
In total, it gets +~50% CPU load during animation.
Sorry, didn't notice that it's no longer about the list of open trades. Gone, I think, 2-3 pages of the thread.
No, it's fine. I just brought up the CPU load because I'm going to redo the communication between the EA and the engine, which means that the open trades table will also take data differently.
Why make the periris 64 frames per second (16 ms), for the eye is enough 32 frames per second.
Good question. In fact, the timer doesn't work smoothly. There are skips. 16,32,16,16...
If you use 32, the skips are 64 ms. And this is noticeable. Besides, various other things also burden and slow down drawing. For instance, the OnChartEvent() event queue.
I think it affects the quality of animation. I tried to use 25 ms. Then 16, and came to the conclusion that 16 better conveys a smooth motion.
Later skolnuyu engine with animation 16 ms and 32 ms and you'll see for yourself. Although, maybe it will be ok....
Good question. In fact, the timer doesn't work smoothly. There are skips. 16,32,16,16...
If you use 32, the skips are 64 ms. And this is noticeable. Besides, various other things also burden and slow down drawing. For instance, the OnChartEvent() event queue.
I think it affects the quality of animation. I tried to use 25 ms. Then 16, and came to the conclusion that 16 better conveys a smooth motion.
Later skolnuyu engine with animation 16 ms and 32 ms and you'll see for yourself. Although, maybe it will be ok....
It's just that it's not really 16ms, but 1000/64=15.625ms. That is why it is better to set 30 ms instead of 32 ms, then there will be fewer skips. i.e. if you put a pause between frames of 33 ms, then the real pause will be 15.625×3=46.875 ms.
Why? Simple, interesting.
Why? Simple, I wonder.
It's just that it's not really 16ms, but 1000/64=15.625ms. That is why it is better to set 30 ms instead of 32 ms, then there will be fewer skips. i.e. if you put a pause between frames of 33 ms, then the real pause will be 15.625×3=46.875 ms.
OK, I'll take that into account.
Reducing the timer frequency will certainly reduce the load on the processor. If it doesn't degrade the quality of the animation, great. The CPU load may be reduced by up to 30 percent, but it still will be.
You'll have to put up with it.
Admittedly, if the drawing distributed between different threads, (eg part of the animation draws the Expert Advisor, and part of the engine), then the load would be almost removed. We have to think...
Alas, my assumption was not confirmed.
Now I have done an experiment - I put one EA on two charts. The Expert Advisor loads the processor by 50%.
I have found out that even when working with different charts, CPU load is summing up and the total load of CPU on MT's side is over 90%.
So, even splitting the charting between different Expert Advisors will not help. The load is adding up!
Alas, my assumption was not confirmed.
Now I've done an experiment - I put one EA on two charts. The Expert Advisor loads the processor by 50%.
I have found out that even when working with different charts, CPU load is summing up and the total load of CPU on MT's side is over 90%.
So, even splitting the charting between different Expert Advisors will not help. The load is adding up!