Wishes for MT5 - page 59

 

To work with graphical objects, we urgently need the event of resizing the chart window.

Let me explain one example why (there are plenty of other examples where this will be needed).

We have a "Grid" control, for example:


we resize the window and get a picture like this:


now we call a method of the class to resize and we get:


So, we are forced to constantly monitor the window dimensions by ourselves, which is not good for the overall performance.

Besides, we need to monitor not only on OnTick but also on timer, because there are no ticks on weekends, for example.

 
AlexSTAL:

To work with graphical objects, the event of resizing the graph window is much needed.

I support this. Moreover, we need the event of change of chart properties at all, because sometimes we have to monitor not only change of window size. I wrote a request to Service Desk before the New Year.
 
AlexSTAL:

To work with graphical objects, the event of resizing the graph window is much needed.

Lizar:
I support this. Moreover, we need the event of change of chart properties at all, because sometimes we have to monitor not only the change of window size. I wrote a request to servicedesk before New Year.
I'll support, though I've long ago released it in tester with custom events, but standard ones are better (and custom ones don't work in tester yet)...
 
AlexSTAL:

To work with graphical objects, we urgently need the event of resizing the chart window.

Let me explain one example why (there are plenty of other examples where this will be needed).

We have a "Grid" control, for example:


we resize the window and get a picture like this:


now we call a method of the class to resize and we get:


So, we are forced to constantly monitor the window size by ourselves, which is not good for the overall performance.

Besides, we need to monitor not only on OnTick but also on timer, because there are no ticks on weekends, for example.

The ChartEvent can throw a special event about the change of window's characteristics.
 
Renat:
ChartEvent can throw a special event about window properties change.

Sorry... I don't understand - is this a question or a statement?

If it's a statement, you can throw it, but you have to monitor it yourself, and it's a resource...

If question - then a separate event in ChartEvent is ideal....

 
AlexSTAL:

Sorry... I don't understand - is this a question or a statement?

If it's a statement, you can drop it, but you have to monitor it yourself and it's a resource...

If the question - then a separate event in ChartEvent is ideal....

We will throw such an event in OnChartEvent ourselves, so developers can easily handle significant changes in the graphical environment.

The task has already been set, let's look at the solution.

 
Renat:

We will throw such an event in OnChartEvent ourselves, so that developers can easily handle significant changes to the graphical environment.

The task has already been set, let's have a look at the solution.

Great!

I'd also like to deal with my ticket #35077...

 
AlexSTAL:

Sorry... I don't understand - is this a question or a statement?

If it's a statement, you can drop it, but you have to monitor it yourself and it's a resource...

If question - then a separate event in ChartEvent is ideal....

Read this article Creating a digital signage using classes from Standard Library and Google Chart API, the author there has implemented scaling, maybe it will help you
 
sergey1294:
Read this article Creating a scoreboard using classes from Standard Library and Google Chart API, in it the author has implemented scaling, maybe it will help you

It's not about scaling, it's about the call point for that scaling....

I've done a quick check and it has everything I mentioned above:


The OnTimer() function monitors the size of the window, and adjusts the size of the scoreboard if necessary, also monitors the arrival of trades likeOnCalculate(), just in case the ticks come in less frequently than 1 per second.

void OnTimer()
{
   int x_size=ChartGetInteger(0, CHART_WIDTH_IN_PIXELS);
   int y_size=ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS);
   //если изменились размеры окна - обновим табло
 
Renat:

We will throw such an event in OnChartEvent ourselves, so that developers can easily handle significant changes to the graphical environment.

The task has already been set, let's look at the solution.

Oh, great. The request is similar: make an event for OnChartEvent about changes in Market Watch window. Otherwise I have to track addition, deletion or rearrangement of characters by myself.