TERMINAL_SCREEN_WIDTH / TERMINAL_SCREEN_HEIGHT

 

Hi all,

I would like basically to reorganize my charts on the terminal by programming, but I can't find a function that returns the size of the MT5 workspace.

I find this :

   int ChartWidth = TerminalInfoInteger(TERMINAL_SCREEN_WIDTH);
   int ScreenHeight = TerminalInfoInteger(TERMINAL_SCREEN_HEIGHT);

at this address : 

https://www.mql5.com/en/docs/constants/environment_state/terminalstatus

But it doesn't work ...

I would like to avoid DLLs

Any idea ?

Thanks

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Client Terminal Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Client Terminal Properties
  • www.mql5.com
Information about the client terminal can be obtained by two functions: TerminalInfoInteger() and TerminalInfoString(). For parameters, these functions accept values from ENUM_TERMINAL_INFO_INTEGER and ENUM_TERMINAL_INFO_STRING respectively. Knowing the parameter value, you can set the size of graphical objects so that they look the...
 
Bruno Paulet:

Hi all,

I would like basically to reorganize my charts by programming, but I can't find a function that returns the size of the MT5 workspace.

I find this :

   int ChartWidth = TerminalInfoInteger(TERMINAL_SCREEN_WIDTH);
   int ScreenHeight = TerminalInfoInteger(TERMINAL_SCREEN_HEIGHT);

Any idea ?

Thanks

Chart and terminal window are not the same.

this and this and this

 
Code2219 or probably 2319:

Chart and terminal window are not the same.

this and this and this

Yes, sure ... I would like to organize the charts windows on the working area of the terminal -

Yes, I write

int ChartWidth = TerminalInfoInteger(TERMINAL_SCREEN_WIDTH);

which is not exact, in fact it's :

int ChartWidth = TerminalInfoInteger(TERMINAL_SCREEN_WIDTH) / N_CHARTS;

 
Bruno Paulet:

Yes, sure ... I would like to organize the charts windows on the working area of the terminal -

Yes, I write

int ChartWidth = TerminalInfoInteger(TERMINAL_SCREEN_WIDTH);

which is not exact, in fact it's :

int ChartWidth = TerminalInfoInteger(TERMINAL_SCREEN_WIDTH) / N_CHARTS;

what exactly you mean by organizing ?
like arranging them like tiles, side by side or so ?
 
Code2219 or probably 2319:
what exactly you mean by organizing ?
like arranging them like tiles, side by side or so ?

Yes, after having optimized 10 pairs (for ex), I select 'x' of them which I would like to display properly on the terminal (Tile vertically for ex) but I didn't find anything to get the size (pixel) of the terminal Windows.

I use a DLL to move and to minimize or restore Charts Windows, but as the size of the working area seems to be very basic, I imagine MT5 provides a function somewhere.

I could read the terminal.ini file, but it's not very clean ...

But I could maximize a chart window and read its size...

 

Bruno Paulet:

...I imagine MT5 provides a function somewhere...

Can't find any. no suggestion ¯\_(ツ)_/¯

reading ini configs is a startup process I assume, and clearly not the choice solution.

Edit : found a nice shrug emoji
 
Thanks "Code2219", maximize a chart window and read its size works, it's a little bit dirty, but I didn't find another way
 
You should look at user32.dll functions. That is in Microsoft's ramblings that they call Documentation.
Reason: