Please give more freedom to manage the graph windows - page 6

 
barabashkakvn:
And how do you make "Crosshair" work in a chart object - I mean, when you crosshair over a chart object, OHLC data is displayed in the status bar?
Haven't tried to do that. Maybe it's possible with these functions:ChartXYToTimePrice() and ChartTimePriceToXY().
 
tol64:
I haven't tried to do this. Maybe it's possible with these functions:ChartXYToTimePrice() and ChartTimePriceToXY().
It's possible, it seems, only there is no access to status line. I want a full "Crosshair" imitation on the chart object, to work like on a normal chart - with the display in the status bar.
 
barabashkakvn:
That's possible, I think, except there's no access to the status bar. I would like a full imitation of "Crosshair" on the graph object, so that it works like a normal graph - with display in the status bar.

Then graphical objects need to be further developed. I am in favour of having as many possibilities as possible with both graphical objects and graphical windows. I see no reason to be against it, just for the sake of being against it. ;)

A good idea would be to collect all the cases where some or other features are needed regarding this issue, and present them in the first post of the survey. The poll should be unlimited in time. Otherwise they often sink in and few people see them due to the fact that maybe they don't look at the forum often.

 
I suggest that you put all the cases where you need some kind of window or graph feature in here right now. Let's discuss. I think we can make a long-form poll, and then we can move this whole thread to the poll.
 

Anyway, here's a semi-replacement of the graph window controls:

 

When the cursor moves over a normal chart, the status bar displays OHLC values, but when the cursor moves over a chart object, the OHLC values are not translated into the status bar. Since MQL does not give access to the status bar, we need to come up with a replacement status bar for the chart object.

So far I can think of OBJ_LABEL text labels.

 
barabashkakvn:

When the cursor moves over a normal chart, the status bar displays OHLC values, but when the cursor moves over a chart object, the OHLC values are not translated into the status bar. Since MQL does not give access to the status bar, we need to come up with a replacement status bar for the chart object.

So far the OBJ_LABEL text labels come to mind.

Our technical support has replied that it will not be possible to transmit OHLC values from OBJ_CHART object bars to the status bar. Therefore we will have to implement our own status bar:

Its own status bar

 

With the placement of the status bar (in the form of OBJ_BITMAP_LABEL), an error occurred: the object is rendered leaving a one-pixel bar below it.

Settings of OBJ_BITMAP_LABEL:

x=0,                      // координата по оси X
y=0,                      // координата по оси Y
CORNER_LEFT_UPPER,        // угол графика для привязки
ANCHOR_LEFT_UPPER,        // способ привязки

I.e. the graphical label object is drawn at the bottom of the chart and the coordinate centre is at the bottom left corner of the chart.

In fact, the graphic label object is not drawn by (0;0) coordinates but by (0;1) coordinates with these settings.

Here is a picture showing a 1 pixel bar:

Incorrect rendering of OBJ_BITMAP_LABEL

Files:
 

A template with one additional window is applied to the chart object and the additional window is resized. After closing and opening the terminal, the chart object resets the height of the additional window to zero. Is this normal?


P.S. I have attached a test script.

Files:
test_script.mq5  13 kb
 
barabashkakvn:

A template with one additional window is applied to the chart object and the additional window is resized. After closing and opening the terminal, the chart object resets the height of the additional window to zero. Is this normal?

When the terminal is closed, the status of graphs is saved to chr files. Not all properties of graphical objects intended for program control are written, this is normal.
Reason: