Panel view

 

Hello! I have a EA which it loads a dashboard onto the charts which I use for trading. When I load this EA on personal computer it is displaying as expected. When I loaded on VPS, some buttons are missing, and it looks like resolution is wrong. P,ease find attached screen shots.


vps


personal computer view

Virtual hosting for MetaTrader 5
Virtual hosting for MetaTrader 5
  • www.mql5.com
The fastest VPS server for forex trading from the MetaTrader 4/5 terminal developers
 
Daniel Cioca: Hello! I have a EA which it loads a dashboard onto the charts which I use for trading. When I load this EA on personal computer it is displaying as expected. When I loaded on VPS, some buttons are missing, and it looks like resolution is wrong. P,ease find attached screen shots.

Is your code making use of the terminal's DPI information, to adjust the size and position of graphical objects, as well as font size?

TERMINAL_SCREEN_DPI

The resolution of information display on the screen is measured as number of Dots in a line per Inch (DPI).

TerminalInfoInteger

TerminalInfoInteger - Checkup - MQL4 Reference
TerminalInfoInteger - Checkup - MQL4 Reference
  • docs.mql4.com
TerminalInfoInteger - Checkup - MQL4 Reference
 

Here is a reference from an older post about MQL5, but it is also valid for MQL4 ...

Forum on trading, automated trading systems and testing trading strategies

Graphical Interfaces and Windows scaling in high res screens.

Fernando Carreiro, 2021.05.30 21:10

Have a look at the documentation regarding the terminal property "TERMINAL_SCREEN_DPI" and also do a search in the forum with that keyword.

TERMINAL_SCREEN_DPI

The resolution of information display on the screen is measured as number of Dots in a line per Inch (DPI).

Knowing the parameter value, you can set the size of graphical objects so that they look the same on monitors with different resolution characteristics.

int

Example of scaling factor calculation:
//--- Creating a 1.5 inch wide button on a screen
int screen_dpi = TerminalInfoInteger(TERMINAL_SCREEN_DPI); // Find DPI of the user monitor
int base_width = 144;                                      // The basic width in the screen points for standard monitors with DPI=96
int width      = (button_width * screen_dpi) / 96;         // Calculate the button width for the user monitor (for the specific DPI)
...
 
//--- Calculating the scaling factor as a percentage
int scale_factor=(TerminalInfoInteger(TERMINAL_SCREEN_DPI) * 100) / 96;
//--- Use of the scaling factor
width=(base_width * scale_factor) / 100;

In the above example, the graphical resource looks the same on monitors with different resolution characteristics. The size of control elements (buttons, dialog windows, etc.) corresponds to personalization settings.