Download MetaTrader 5
To add comments, please log in or register
Launch your trading signal. Make profit from paid subscription!
Pavel Soukup
559
Pavel Soukup 2014.02.24 22:46 

I find way how get count open chart window in platform MT4 and how get their handle.

I need control if open new chart window . I use for open window this code and sometimes it happens that the command

PostMessageA(hTerminal, WM_COMMAND, 33160, 0);

don´t open new chart window. I need catch this situation.

Thank you.

qjol
3243
qjol 2014.02.24 23:59  
Pavel Soukup
559
Pavel Soukup 2014.02.25 06:27  
qjol:
4 B600 > ChartOpen ChartClose


Hi gjol,

thank you a lot. I see new build have more new, practic, function. I must study documentation.

But I not found function for open new chart with automatic EA/Indi...:-( I don´t see combination command for it.

Unfortunately, I don´t see common function, example ChartOpen( Symbol(), Period(), "my_template.tpl" );

Function ChartApplyTemplate() need parameter chartID and this get from function ChartID() but this function I must call (apply) only from new open chart...(some EA on chart)

I´m afraid that new functions fail catch event if open new chart with EA/scripts/indicator... :-( Maybe I was wrong but I don´t see code with new function MQL for it.





qjol
3243
qjol 2014.02.25 06:43  

i really don't get u

long ChartId = ChartOpen("EURUSD", PERIOD_H4);
ChartApplyTemplate(ChartId, "my_template");
Pavel Soukup
559
Pavel Soukup 2014.02.25 09:12  
You have true, gjol. I read wrongly return value from function ChartOpen()... Thanks a lot!!!
whroeder1
13972
whroeder1 2016.11.22 15:27  
Pavel Soukup:

PostMessageA(hTerminal, WM_COMMAND, 33160, 0);
  1. Since February 3, 2014 (Build 600) Strings are Unicode so the PostMessageA (A version can't work.) What's New in MQL4 - MQL4 Documentation Upgrade to MetaTrader 4 Build 600 and Higher - MQL4 Articles
  2. Perhaps you should re-read the manual. List of MQL4 Functions - MQL4 Reference
Updated MQL4 - MQL4 Reference
Updated MQL4 - MQL4 Reference
  • docs.mql4.com
Updated MQL4 - MQL4 Reference
/
To add comments, please log in or register