Start with reading #define's for known commands that can be used for PostMessageA() - MQL4 forum
Get the chart handle and send it the window command to maximize/minimize
Thanks, but the function GetWindow is not defined in Mt4. How I overcome this ?
#import "user32.dll" int GetAncestor(int, int); #import(copy pasted from the same link WHRoeder sent you)
Thanks again. Where can I get documentation about this "user32.dll" functions ?
I'm searching for the MT4 answer to the same question as the OP, and more:
1. Is there any way that a script or indicator can send a message to some ChartID to Open, Maximize or Minimize that chart window?
2. Any commands to retrieve the current window status? (As in either: Open, or Minimized (a.k.a. iconified), or Maximized (full screen).
3. Now that we have many more commands available in b600+ (up to b1090 now), is there a command to resize a chart ? (I looked, but haven't spotted it yet).
4. Given the Charts Bar, with it's list of charts (i.e. "symbol,period_name"), is there a way to re-arrange / re-order those symbols, by commands? (to achieve what can be done manually).
The ultimate purpose would be to code up some custom chart window tiling scripts or code, that could achieve far more than just the few basic auto-tiling options in MT4.
For example, auto-tile only those windows that are current open(visible), and ignore those that are iconified.
Open windows for specific pair(s), iconify everything else, and Tile(Arrange) the open ones. (Or Cascade, or Tile Vertically, or Tile Horizontally, ... etc.)
A user can specify pair(s), desired timeframes, and desired templates, then all of these could be auto-opened and arranged auto-MAGICally. (Cool idea right?)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I developed a code to calculate a personal indicator. I apply it to 3 simultaneous pairs, presented in the screen in 3 Windows.
I intend to maximize the window where the indicator overcome a thereshold and, later, minimize that window when in no longer ok.
Exist a comand to maximize and minimize a window ?
Thanks