Scripting query on MT4's user interface

 

Will MT4's programming functionality allow me (a newcomer to MT4, but not to programming) to write a script to cycle through all open chart windows and change each chart's timeframe to (say) H4?

Thanks,

John

 
jft:

Will MT4's programming functionality allow me (a newcomer to MT4, but not to programming) to write a script to cycle through all open chart windows and change each chart's timeframe to (say) H4?

You can use the code on this thread with an added SendMessageA() call to change the timeframe. It's doable, but might not be very reliable...
 
gordon:
You can use the code on this thread with an added SendMessageA() call to change the timeframe. It's doable, but might not be very reliable...

Gordon,

Thank you - I'll give it a try now.

Kind regards,

John

 
gordon:
You can use the code on this thread with an added SendMessageA() call to change the timeframe. It's doable, but might not be very reliable...
Don't know why you'd want to. If your writing/using an EA, open multiple charts, attach copies with its own parameters (magic number) to each time frame.
 
WHRoeder:
Don't know why you'd want to. If your writing/using an EA, open multiple charts, attach copies with its own parameters (magic number) to each time frame.
Some manual traders like tools to automate certain tasks in the Terminal. See the thread I mentioned for a good example. Only jft can tell u why, as he is the one who asked the question...
 
Agreed, but if he's manually trading isn't it easier to click the time frame on the tool bar?
 
WHRoeder:
Agreed, but if he's manually trading isn't it easier to click the time frame on the tool bar?
I don't know. Maybe he has 10 charts open and he want's to automate this process...
Reason: