Download MetaTrader 5
To add comments, please log in or register
Improve your rating. Execute orders in Freelance service!
Nikhil
7
Nikhil 2014.08.10 07:04 

Hi all,

I would like to be able to automatically tile all chart windows in the MT4 terminal. The keyboard command is <ALT> + R, and this can be automated using keyboard events e.g. https://www.forex-tsd.com/metatrader-programming/3805-key-event-within-mq4-programs.html. However, this solution requires the MT4 terminal window to have focus / be selected in order to complete.

Is there a solution which can complete fully in the background? E.g. using PostMessageA()? https://forum.mql4.com/30667 contains many commands but does not have the equivalent of <ALT> + R. 

Alternatively, how do I find out the commands which can be used with PostMessageA()?

Any thoughts would be appreciated, thanks!

whroeder1
13640
whroeder1 2014.08.10 12:30  
Navvy1846:

I would like to be able to automatically tile all chart windows in the MT4 terminal. The keyboard command is <ALT> + R,

However, this solution requires the MT4 terminal window to have focus / be selected in order to complete.

Is there a solution which can complete fully in the background? E.g. using PostMessageA()? https://forum.mql4.com/30667 contains many commands but does not have the equivalent of <ALT> + R. 

Alternatively, how do I find out the commands which can be used with PostMessageA()?

Any thoughts would be appreciated, thanks!

  1. The tile command is Alt W T, Alt W H, Alt W V. Alt R just beeps.
  2. #define's for known commands that can be used for PostMessageA() - MQL4 forum You can send them to the foreground window or the current window. You can also make any chart the forground ChartSetInteger() - CHART_BRING_TO_TOP
  3. No it doesn't
  4. You already have the link.
  5. A) You can't use postmessage, you'll have to send key strokes, with delays. This has always been unreliable.
  6. B) Just tile them and your are done. Expand one to see it, unexpand to go back.


Nikhil
7
Nikhil 2014.08.11 13:36  

Thanks WH. Alt + R is what is listed in Windows -> Tile Windows. It works fine when I use a keystroke script and give the terminal window focus, but beeps when I don't give focus. I can try the alternatives you suggested, though as you said they will require delays.

Shame that PostMessageA() can't be used. Glad you let me know.

CHART_BRING_TO_TOP is a good tip! Should help me with another idea I was investigating.

 

If anyone has any ideas on alternative solutions, suggest away!

/
To add comments, please log in or register