| / | Forum |
|
adamp
2010.03.18 21:49
I need someones help, because I am stuck since a few hours now with the following task:
A graphical object is attached to a chart - an arrow in this case. This object needs a time and a price as coordinate. Now I wanna convert the time and price coordinate into a pixel based coordinate. Any idea how this can be achieved? I was thinking about using WindowPriceMin / Max, WindowsFirstVisibleBar and WindowBarsPerChart, but don't know exactly how. To help me with this problem, I also have written a DLL that gives me the width and height of the current chart window in pixels. But still no idea how to solve it... maybe sitting too long in front of this. Any help appreciated :-) |
|
Error 146 ("Trade context busy") and How to Deal with It The article deals with conflict-free trading of several experts on one МТ 4 Client Terminal. It will be useful for those who have basic command of working with the terminal and programming in MQL 4. |
|
Ais
2010.03.18 22:57
A Sample: Chart metrics, http://forum.mql4.com/17243/page7#276861 |
|
adamp
2010.03.19 00:06
Thank you for providing this link, but I can's see how to use this code. Can you give an example?
|
|
nondisclosure
2010.03.19 04:22
adamp wrote >>
I need someones help, because I am stuck since a few hours now with the following task: A graphical object is attached to a chart - an arrow in this case. This object needs a time and a price as coordinate. Now I wanna convert the time and price coordinate into a pixel based coordinate. Any idea how this can be achieved? I was thinking about using WindowPriceMin / Max, WindowsFirstVisibleBar and WindowBarsPerChart, but don't know exactly how. To help me with this problem, I also have written a DLL that gives me the width and height of the current chart window in pixels. But still no idea how to solve it... maybe sitting too long in front of this. Any help appreciated :-)
|
|
nondisclosure
2010.03.19 04:25
|
|
adamp
2010.03.19 05:19
This library already helped me a lot. Now I know how many bars are left on the right hand side of the chart shift.
Together with the bars on the left, min and max price, I can calculate a good approximation of the position. I am very excited how accurate this will be. But seems promising so far. |
|
nondisclosure
2010.03.19 20:19
adamp wrote >>
This library already helped me a lot. Now I know how many bars are left on the right hand side of the chart shift. Together with the bars on the left, min and max price, I can calculate a good approximation of the position. I am very excited how accurate this will be. But seems promising so far. |