There are X and Y coordinates, how do I set the condition for ChartXYToTimePrice to count from the right corner?
ChartXYToTimePrice counts the coordinates from the top left corner. And no matter how you calculate from the right-hand corner, you will always have to convert it to the top-left corner. What is the purpose of this tambourine? What object do you want to place relative to the right corner? Why don't you read the handbook? There are all the examples and explanations.
Существует ряд графических объектов, для которых можно задавать угол графика, относительно которого указываются координаты в пикселях. Это следующие типы объектов (в скобках указаны идентификаторы типа объекта): – объекты имеет ширину и высоту. Если указано "только для чтения", то это означает, что значения ширины и высоты вычисляются только...
I've read and found examples, and the code is based on them,
but there are no examples of how to change the angle(
It makes no difference from which angle the starting coordinate of the object is counted. This angle is the origin of the coordinates. Where the objects are located is up to you to calculate their coordinates from the origin.
Alexey Viktorov: I must have looked too hard. Here are examples and all the explanations.
OBJ_CHANNEL requires time and price and XU can only be obtained with ChartXYToTimePrice
Artyom Trishkin:
It makes no difference from which corner the initial object coordinate is counted. This corner is the origin of coordinates. And where the objects will be is up to you to calculate their coordinates from the origin.
You can do it this way, but if the window size changes or the resolution is different on another computer, the object is shifted.
MakarFX: You got me right, I'll try to look it up. Thank you.
Here is an example from the documentation.
//--- создаём кнопку шириной 1.5 дюйма на экране int screen_dpi = TerminalInfoInteger(TERMINAL_SCREEN_DPI); // получим DPI монитора пользователя int base_width = 144; // базовая ширина в экранных точках для стандартных мониторов c DPI=96 int width = (button_width * screen_dpi) / 96; // вычислим ширину кнопки для монитора пользователя (с учётом его DPI)
...
//--- вычисление коэффициента масштабирования в процентах int scale_factor=(TerminalInfoInteger(TERMINAL_SCREEN_DPI) * 100) / 96;
//--- использование коэффициента масштабирования
width=(base_width * scale_factor) / 100;
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.
Alexey Viktorov:
Read the handbook carefully. OBJ_CHANNEL has nothing to do with the angle.
Got it!
Then back to the previous question:
There are X and Y coordinates, how to set a condition for ChartXYToTimePrice to count from the right corner?
Got it!
Then back to the previous question:
There are X and Y coordinates, how do I set the condition for ChartXYToTimePrice to count from the right corner?
ChartXYToTimePrice counts the coordinates from the top left corner. And no matter how you calculate from the right-hand corner, you will always have to convert it to the top-left corner. What is the purpose of this tambourine? What object do you want to place relative to the right corner? Why don't you read the handbook? There are all the examples and explanations.
What is the purpose of such a tambourine dance?
The left corner is busy(
Why don't you read the handbook? After all, all the examples and explanations are there.
I've read and found examples, and the code is based on them,
but no examples of how to change the angle(
The left corner is busy(
I've read and found examples, and the code is based on them,
but there are no examples of how to change the angle(
The left corner is busy(
I've read and found examples, and the code is based on them,
but there are no examples of how to change the angle(
It makes no difference from which angle the starting coordinate of the object is counted. This angle is the origin of the coordinates. Where the objects are located is up to you to calculate their coordinates from the origin.
I must have looked too hard. Here are examples and all the explanations.
OBJ_CHANNEL requires time and price and XU can only be obtained with ChartXYToTimePrice
It makes no difference from which corner the initial object coordinate is counted. This corner is the origin of coordinates. And where the objects will be is up to you to calculate their coordinates from the origin.
You can do it this way, but if the window size changes or the resolution is different on another computer, the object is shifted.
OBJ_CHANNEL requires time and price and XU can only be obtained with ChartXYToTimePrice
This is possible, but if the window size changes or the resolution is different on another computer, the object is shifted.
You are talking in abstract terms. Take a screenshot of the screen - what you are placing there and why you see a problem. What is shifting where?
OBJ_CHANNEL requires time and price and XU can only be obtained with ChartXYToTimePrice
This is possible, but if the window size changes or the resolution is different on another computer, the object is shifted.
Then look in the documentation for how to determine the DPI and use this to determine the width of the graph window.
Then look in the documentation for how to determine the DPI and use this to determine the width of the graph window.
You got me right, I'll try to look it up. Thank you.
Here is an example from the documentation.