Please give more freedom to manage the graph windows

 

At the moment, you cannot manage chart windows using MQL5 tools, without the use of WinAPI:

  • you cannot change the size of the chart window programmatically
  • you can't make any chart window active
  • You can't place chart windows as cascades, mosaics, horizontally, etc.

Can we expect in the future to introduce properties and methods for working with the size of chart windows?

As an example, tab switching, but implemented using WinAPI:

In the process of realising the "want" for window management, solutions began to appear:

  1. Applying templates to OBJ_CHART
  2. Setting the status bar (OHLC) in OBJ_CHART
 
Just one question - why?
 
TheXpert:
One question is why?

For example, switching the chart windows to show the current situation of the instrument in semi-automatic trading - the Expert Advisor will make the chart on which there is a signal to enter the market active. A human remains to analyze and confirm or reject the operation.

But access to the size of chart windows will allow placing several (for example, two) charts next to each other:

Two graphs side by side

Two charts side by side

This combination of charts will make it possible to implement utilities and analyzers with a more convenient interface. In the picture above, the right-hand chart window does not overlap the left-hand window and you can display additional information or a different timeframe in the left-hand window.

 

Here is an example of how two windows can be positioned:

 

There is an OBJ_CHART object for that

The main chart should be a container and it should not be changed programmatically.

Otherwise, it will come to the point of transferring the MT window to another monitor.)

 
komposter:

There is an OBJ_CHART object for that

The main chart should be a container and it should not be changed programmatically.

Otherwise, it will come to the point of transferring the MT window to another monitor.)

It would be good. I'm sick of huddling on one monitor when the other one is free.
 
komposter:

There is an OBJ_CHART object for that

The main chart should be a container and it should not be changed programmatically.

Otherwise it will come to the point of transferring МТ window to another monitor.)

The OBJ_CHART object can be perfectly placed in an additional subwindow - but this subwindow cannot be placed vertically.
So far the subwindow cannot be positioned vertically, we have to get round using WinAPI for window positioning.
And if the subwindow could be placed vertically, the area of the main chart would be used much more efficiently.
 
It turns out that tab switching can be implemented withCHART_BRING_TO_TOP. But the switching is uneven, with delays. I have a feeling that it is related to ticks incoming. I am attaching the script of chart switching.
Files:
 
barabashkakvn:
It turns out that switching of tabs can be implemented withCHART_BRING_TO_TOP. But the switching is uneven, with delays. I have a feeling it's related to tick incoming

To solve the latency problem, use ChartRedraw();

bool ChartBringToTop(const long chart_ID=0)
  {
//--- сбросим значение ошибки
   ResetLastError();
//--- покажем график поверх всех других
   if(!ChartSetInteger(chart_ID,CHART_BRING_TO_TOP,0,true))
     {
      //--- выведем сообщение об ошибке в журнал "Эксперты"
      Print(__FUNCTION__+", Error Code = ",GetLastError());
      return(false);
     }
   ChartRedraw(chart_ID);
//--- успешное выполнение
   return(true);
  }
 
komposter:

Otherwise it will come to the point of transferring the MT window to another monitor.)

It is high time, they do not make instruments on a car in one window to flip through on the fly, and six charts on one monitor is too much.

It has been noticed for a long time that there is a direct correlation between a trader's success and the size of instrument windows

https://www.mql5.com/ru/forum/9156

CORRELATION[correlation] is a quantity describing the mutual dependence of two random variables, X and Y, whether it is determined by some causal relationship or simply a random coincidence (false C.).

slovari.yandex.ru

I don't believe in random coincidences

 
Kos:

To solve the latency problem, use ChartRedraw();

Thank you. It works now.
Reason: