How to make objects drawn by XY change smoothly (MT4 vs MT5) - page 5

 
Dmitry Fedoseev:

What are you doing? Why do you need such a linkage - to price via pixels?

Trying to conquer the world.)

In fact, I want to transfer a couple of products to MT5. They have such a specificity that it won't work without XY.

Aleksei Beliakov:

Try to output/update the canvas not more than 30 times per second

To speed up the tester? Well not much time has passed yet, I will be poking buttons and trying different manipulations.

 
Vitaliy Kuznetsov:

...

In fact, I want to transfer a couple of products to MT5. They have such specifics that you can't do it without XY.

...

That's what I'm asking. ?

 
Nikolai Semko


Nikolai, I have a question about kanvas. I also have one trading panel on MT4.

I'm thinking of rewriting graphics to look nice on MT5 at different screen resolutions. The only problem is that almost all graphics are in bmp.

Is it realistic to monitor the font size and make a "rubber design" of the panel changing the size of bmp files? Or, is it easier to make two bmp graphics - "normal" and 4k?

 
By the way, Vitaly, pay attention also to the kanvas implemented on OBJ_BITMAP and not on OBJ_BITMAP_LABEL.
https://www.mql5.com/ru/forum/364640/page12#comment_21305905
I haven't experimented with this kind of kanvas yet.
There might be a more ideal solution here.

 
Vitaliy Kuznetsov:
Nikolai Semko


Nikolai, I have a question about kanvas. I also have one trading panel on MT4.

I'm thinking of rewriting graphics to look nice on MT5 at different screen resolutions. The only problem is that almost all graphics are in bmp.

Is it realistic to monitor the font size and make a "rubber design" of the panel changing the size of bmp files? Or is it easier to make two versions of bmp graphics - "normal" and 4k?

Of course it is possible. The main advantage of kanvas is 100% flexibility and possibility of everything and no limitations. The main thing is creativity.
You can download my latest free product, open the panel and scale the MT5 window.
Even bmp can be scaled in kanvas. I gave you an example somewhere.
Here it is:
https://www.mql5.com/ru/forum/227736/page66#comment_20456641
you can use my better (in terms of image) algorithm or the simpler and faster one by Yuri.

Canvas - это круто!
Canvas - это круто!
  • 2021.01.29
  • www.mql5.com
Поставил себе задачу: коротким кодом эффектно продемонстрировать возможности пользовательской графики через класс CCanvas...
 
Vitaliy Kuznetsov:
Nikolai Semko


I'm thinking of rewriting the graphics to look nice on MT5 at different screen resolutions. Except that almost all graphics are in bmp.

Just don't forget about the parameter

TerminalInfoInteger(TERMINAL_SCREEN_DPI)
 
Nikolai Semko:

...

Thank you. I think if I'm pressed for time, it's easier to freelance for rewriting graphics through kanvas.

By the way, the optimization is slowly starting to work out. The tester is now faster than it was. The only thing left to do is to find and fix why the histogram does not shift during the operation.

I am also a bit annoyed by MT5 for loading of quotes and the effect it produces in the process. Here's a description and a prototype -https://www.mql5.com/ru/forum/373465

I'm doing a cross-link, because who knows if that topic will be seen or not, and there are strong progers here, and maybe they'll pay attention.
Мигание линий и прямоугольников в момент прогрузки котировок
Мигание линий и прямоугольников в момент прогрузки котировок
  • 2021.07.16
  • www.mql5.com
Столкнулся со следующей проблемой в МТ5. Есть индикаторы, которые рисуют линии и прямоугольники на указанное кол-во свечей...
 
Vitaliy Kuznetsov:

Thank you. I think if time is tight, it would be easier to freelance to rewrite the graphics through Canvas.

I doubt it can be done in freelance. If you want to be sure that the entrance to the site is already opened and the entrance to the site is already open, then the entrance is closed.

Vitaliy Kuznetsov:

For MT5 I am also a bit annoyed by quotes loading and the effect it produces. I gave a description and a prototype here -https://www.mql5.com/ru/forum/373465

I'm making a cross-link, since who knows if they will see that thread or not, and there are strong progamers here, and maybe they will pay attention.

That's why I don't like objects, because they have their own life in their flows, the control over which is not available to you. With kanvas on the contrary - everything is in your hands. That's why I have to write additional code for the tester with canvas not to slow down when calculating frames at each tick more than 30 times per second.
Also, working with TFs and history loading is very unreasonable and inefficient in MT5. Only M1 are loaded, and in an unpacked form, while others are only calculated from M1. Therefore, if you enable MN1 for the first time, 100 bars will take more than 10 seconds to load. I had to write the bar load myself and convert M1 to packed form and have all calculated TFs in memory. All my TFs together with M1 take up a fraction of the space in RAM than just the regular M1 in MT5.

 
Nikolai Semko:

And working with TFs and history loading in MT5 is terribly unreasonable and inefficient. Only M1 is downloaded, and in unpacked form, others are only calculated from M1. Therefore, if you enable MN1 for the first time, 100 bars will take more than 10 seconds to load. I had to write the bar load myself and convert M1 to packed form and have all calculated TFs in memory. All my TFs together with M1 take much less space in RAM than only one regular M1 in MT5.

Why don't the Admins and programmers of the project react? This is the primary basis. I've heard that some traders find it hard to switch to MT5 because of the slowness with switching timeframes.

But I did not understand it until I faced it myself. And now it turns out that programmers write their own loader for convenience.


But I have a rectangle chart written through a canvas that is not flashing but bouncing left/right


 
Vitaliy Kuznetsov:

But the bars count rectangle graphic, written through a kanvas, is not flashing, but bouncing left/right


This is an error in the code. Canvas has nothing to do with it.
Reason: