Can you tell me how to click the button to expand the window (i.e. the chart) from the service (EA)? There is a function ChartGetInteger with the parameter CHART_IS_MAXIMIZED, but this property is read-only. Maybe there is some non-programming way ?
The way I do it. 0) I close all windows. 1) I open the chart via ChartOpen 2) I load a template on it using ChartApplyTemplate. The window is always not maximally expanded. If there are 100 such windows, it does not look very good. I always have to expand the EA window myself to evaluate the work of the Expert Advisor.
Примеры работы с графиком - Константы графиков - Константы, перечисления и структуры - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
void arrangeHorizontal() {
long y = TerminalInfoInteger(TERMINAL_TOP);
long h = TerminalInfoInteger(TERMINAL_BOTTOM);
int hWnd = (int)ChartGetInteger(0, CHART_WINDOW_HANDLE, 0);
SetWindowPos(GetParent(hWnd), 0, 0, 0, 225, h - y, 0);
}
And then I add the created button to the panel and move the panel a little bit as a result I get:
This leads to two questions 1) How can I bind all buttons if I use the variable "i" equal to the number of characters when creating them? 2) How can I prevent the panel created through the library from moving?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I've been using this code for a long time.
I've been using this code for a long time.
Can you please tell me how to transfer money from my Baybit account to the MQL5 environment?
Can you tell me how to click the button to expand the window (i.e. the chart) from the service (EA)? There is a function ChartGetInteger with the parameter CHART_IS_MAXIMIZED, but this property is read-only. Maybe there is some non-programming way ?
The way I do it. 0) I close all windows. 1) I open the chart via ChartOpen 2) I load a template on it using ChartApplyTemplate. The window is always not maximally expanded. If there are 100 such windows, it does not look very good. I always have to expand the EA window myself to evaluate the work of the Expert Advisor.
Can you tell me how to click from the service(EA) to expand the window i.e. chart ?
I can't check, but:
I can't verify it, but:
only GetParent is also needed once or twice (I don't remember how many :-) )
and this is from the build, the authors may well change the structure of window nesting.
I mean it's not good to do it this way, only out of desperation.
but you also need GetParent
GetParent
Thanks guys. I combined your answers, indexed a bit and it worked:
I create a button using Controls\Button.mqh library and a panel using: Controls\Dialog.mqh
.
And then I add the created button to the panel and move the panel a little bit as a result I get:
This leads to two questions
1) How can I bind all buttons if I use the variable "i" equal to the number of characters when creating them?
2) How can I prevent the panel created through the library from moving?