Read the help. These are read-only chart properties:
Chart width in pixels | int r/o | |
Chart height in pixels | int modifier - subwindow number |
- www.mql5.com
How can i do to set the size and posizion of a chart by code, then?
Thanks.
How can i do to set the size and posizion of a chart by code, then?
Thanks.
You can GET the dimensions of the graph. You cannot SET the dimensions of the graph (if we are talking about standard graphics).
But you can create a graph - a graphic object ( OBJ_CHART ) and then you can control the size (example inside the help)
Add:
- www.mql5.com
Thanks for the explanation.
With "if we are talking about standard graphics" you mean that i could achieve this using external libraries?
Thanks for the explanation.
With " if we are talking about standard graphics" you mean that i could achieve this using external libraries?
Read above. I said everything and gave examples. I also highly recommend reading the help.
By the way, take a look at the new charting functions: (applies to real charts)
CHART_IS_DOCKED | The chart window is docked. If set to false, the chart can be dragged outside the terminal area | bool |
CHART_FLOAT_LEFT | The left coordinate of the undocked chart window relative to the virtual screen | int |
CHART_FLOAT_TOP | The top coordinate of the undocked chart window relative to the virtual screen | int |
CHART_FLOAT_RIGHT | The right coordinate of the undocked chart window relative to the virtual screen | int |
CHART_FLOAT_BOTTOM | The bottom coordinate of the undocked chart window relative to the virtual screen | int |
- www.mql5.com
Thank you very much for the info mate. I'll make some tests when i'm free from work.
Bytheway i try to read the help but sometimes i just don't know what to look for :)
Have a nice day.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
may i ask why i can't set the height, width and position of a chart after opening it?
This is the code i use:
I also tried to use WindowRedraw(); and tried to write a different indicator just with
to put directly on the new opened chart but nothing works!
Thanks.