Errors, bugs, questions - page 2041

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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 there is a price chart and it tells us what price and time correspond to the X,Y coordinates we specified in that chart.
This is understandable, passing the parameter by reference. But the question is open: why doesn't the function see in which subwindow number the indicator is installed and doesn't take data from it?
This is understandable, passing the parameter by reference. But the question is open: why doesn't the function see which subwindow number the indicator is installed in and take data from it?
CHART_HEIGHT_IN_PIXELS
It's a whole story with calculations if you have several indicators in subwindows, but thanks anyway for your time.
It's a whole story with calculations if there are several indicators in subwindows, but thanks anyway for your time.
https://www.mql5.com/ru/docs/chart_operations/chartwindowfind
https://www.mql5.com/ru/docs/chart_operations/chartwindowfind
Yes these are all functions I know.
The task is simple, we need to link the object in the 4th sub-window (highlighted in red) to the price, in this case it is -0.02, and the Y coordinate on the graph is 34
The task is simple, you need to link the object in sub-window 4 (highlighted in red) to the price, in this case it is -0.02, and the Y coordinate on the graph is 34
Thanks for the finished variant, I'll try to attach it to the indicators.
P.S. It worked, thanks again!
But the question remains, why should I specify the subwindow number in the function, if I have to dance with tambourine?
Why should I specify the subwindow number in the function if I have to play with it?
Forum on trading, automated trading systems and strategy testing
Errors, Bugs, Questions
Kirill Belousov, 2017.10.15 19:50
We don't specify the subwindow number, 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 what price and time correspond to the X,Y coordinates we specified on that chart.Thanks for the finished variant, I'll try to attach it to the indicators.
P.S. It worked, thanks again!
But the question remains, why should I specify the subwindow number in the function, if I want to make a mess?
The dance can be shortened by using ChartGetInteger() with this parameter
CHART_WINDOW_YDISTANCE
Distance in pixels along the vertical Y-axis between the upper border of the indicator subwindow and the upper border of the main chart window. At mouse events, the cursor coordinates are passed in the coordinates of the main chart window, while the coordinates of graphical objects in an indicator subwindow are set relative to the upper left corner of the subwindow.
The value is required for converting the absolute coordinates of the main chart to the local coordinates of a subwindow for correct work with the graphical objects whose coordinates are set relative to the upper left corner of the subwindow frame.
int r/o modifier - subwindow number
The dance can be shortened by using ChartGetInteger() with this parameter
CHART_WINDOW_YDISTANCE
Distance in pixels along the vertical y-axis between the upper frame of the indicator subwindow and the upper frame of the main chart window. At mouse events, the cursor coordinates are passed in the coordinates of the main chart window, while the coordinates of graphical objects in an indicator subwindow are set relative to the upper left corner of the subwindow.
The value is required for converting the absolute coordinates of the main chart to the local coordinates of a subwindow for correct work with the graphical objects whose coordinates are set relative to the upper left corner of the subwindow frame.
int r/o modifier - subwindow number
Thanks, shortened, same result, but less code!