How to get chart window dimensions - height and width?

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 :

But it doesn’t work …

I would like to avoid DLLs

Any idea ?


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…

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, 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.