MouseMove(x, y, key) parameters are used. The cursor position and mouse click are determined, the main line is moved by mql, not by the capabilities of the terminal interface, i.e. the program monitors the position of the cursor relative to the line, not the line movement. Simultaneous movement of lines is ensured by synchronous change of coordinates of the main and dependent lines.
Strangely, I don't use mouse coordinates at all, just responding to id == CHARTEVENT_MOUSE_MOVE. And everything works fine, which is actually logical.
You don't need custom DND for smoothness. If you make a custom DND then you should also make custom objects via kanvas. There can't be any lag, because the object is always the same.
Works in the main window, it does not work in subwindows, as you can see from the prints.
Also, the function substitutes the subwindow number with "0", i.e. with the main one:
Преобразует координаты X и Y графика в значения время и цена.
boolChartXYToTimePrice(
long chart_id, // идентификатор графикаint x, // координата X на графикеint y, // координата Y на графикеint& sub_window, // номер подокнаdatetime& time, // время на графикеdouble& price // цена на графике
);
This is not the answer at all, nor is it the solution.
We specify the subwindow number, and it could be 3 or 4, then how do we specify the coordinates?
There is a clear error in the function.
We do not specify the subwindow number, but the function tells us (this is an output parameter, not an input parameter) - in which subwindow of the chart with the specified ID is the price chart and tells us what price and time correspond to the specified X,Y coordinates on that chart.
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.
Doesn't work in the indicator subwindow, what am I doing wrong?
MouseMove(x, y, key) parameters are used. The cursor position and mouse click are determined, the main line is moved by mql, not by the capabilities of the terminal interface, i.e. the program monitors the position of the cursor relative to the line, not the line movement. Simultaneous movement of lines is ensured by synchronous change of coordinates of the main and dependent lines.
Strangely, I don't use mouse coordinates at all, just responding to id == CHARTEVENT_MOUSE_MOVE. And everything works fine, which is actually logical.
You don't need custom DND for smoothness. If you make a custom DND then you should also make custom objects via kanvas. There can't be any lag, because the object is always the same.
Doesn't work in the indicator subwindow, what am I doing wrong?
but what was expected and what exactly isn't working?
Expected to convert coordinates in a sub-window, and get a price.
Works in the main window, it does not work in subwindows, as you can see from the prints.
Also, the function substitutes the subwindow number with "0", i.e. with the main one:
Compilation error
Expected to convert coordinates in a sub-window, and get a price.
Works in the main window, it does not work in subwindows, as you can see from the prints.
Also, the function substitutes the subwindow number with "0", i.e. with the main one:
From the function help: X and Y - coordinates are counted from the upper left corner of the main chart window.
x=5, y=34 also refers to the main window, therefore output window=0.
Try increasing Y by the height of the main window to "end up" in a different window
Compilation error
From the function help: X and Y are coordinates referenced from the top left corner of the main graph window.
x=5, y=34 also refers to the main window, so the output is window=0.
Try increasing Y by the height of the main window to "end up" in another window
This is not the answer at all, nor is it the output.
We specify the subwindow number, and it could be 3 or 4, then how do we specify the coordinates?
There is a clear error in the function.
This is not the answer at all, nor is it the solution.
We specify the subwindow number, and it could be 3 or 4, then how do we specify the coordinates?
There is a clear error in the function.
Is it acceptable to declare and assign inside while(...) instead of checking the condition?
Let the developers check. C++ compiles, although line (2) [but not (3)] may cause an error in obsolete compilers