Is there any way to control the screen position (X,Y) of chart windows in MQL5?

 

Hi all,

I've been searching through the MQL5 documentation and forum, but I can't seem to find a way to programmatically control the screen position (X, Y) of chart windows in MetaTrader 5.

I know that we can control the chart size using:

ChartSetInteger(chart_id, CHART_WIDTH_IN_PIXELS, ...);
ChartSetInteger(chart_id, CHART_HEIGHT_IN_PIXELS, ...);

We can also open/close charts, change symbols, timeframes, apply templates, and bring charts to the front with:

ChartSetInteger(chart_id, CHART_BRING_TO_TOP, true);

However, I can't find any equivalent property or function like CHART_X_POSITION or CHART_Y_POSITION to actually move the chart window to a specific screen coordinate.

ALT + R tiles charts, but it doesn't support specific grids like 6x3 — it decides the layout automatically.

If it's not possible, can MetaQuotes consider adding this to the API? It would be incredibly useful for traders managing large numbers of charts.

Rob

 
Robert Northen:

Hi all,

I've been searching through the MQL5 documentation and forum, but I can't seem to find a way to programmatically control the screen position (X, Y) of chart windows in MetaTrader 5.

I know that we can control the chart size using:

ChartSetInteger(chart_id, CHART_WIDTH_IN_PIXELS, ...);

No you can't, it's read only. 

ChartSetInteger(chart_id, CHART_HEIGHT_IN_PIXELS, ...);

Yes but only for subwindow INSIDE a chart window, you can't the set the chart window height itself.

We can also open/close charts, change symbols, timeframes, apply templates, and bring charts to the front with:

However, I can't find any equivalent property or function like CHART_X_POSITION or CHART_Y_POSITION to actually move the chart window to a specific screen coordinate.

ALT + R tiles charts, but it doesn't support specific grids like 6x3 — it decides the layout automatically.

If it's not possible, can MetaQuotes consider adding this to the API? It would be incredibly useful for traders managing large numbers of charts.

Rob

In summary you can't with MQL.

You would need to use WinAPI.

 
Alain Verleyen #:
No you can't, it's read only.  Yes but only for subwindow INSIDE a chart window, you can't the set the chart window height itself.

In summary you can't with MQL.

You would need to use WinAPI.

I'm not surprised by the answer — but I am disappointed. In fact, I'm beyond disappointed. I'm frustrated, and frankly, baffled.

There is a huge disconnect between developers and the MetaTrader platform when basic, fundamental functionality like chart window positioning is not — after all these years — exposed to the API. This isn’t some complex feature. This isn't asking for deep integration into external systems or AI-driven charting. This is basic GUI control — the ability to lay out chart windows in a user-defined grid, a feature expected from any modern trading platform.

The fact that users are still having to ask for this in 2025 is honestly embarrassing. This isn't technically difficult. It's not some unsolved computer science problem. It's simply a feature MetaQuotes has chosen not to provide — for reasons nobody can explain.

Other platforms — NinjaTrader, MultiCharts, Sierra Chart, even TradingView — all allow proper workspace management. It's part of respecting your users' workflows. MetaTrader simply doesn't. And this isn't a minor omission. For anyone trading multiple charts, using multiple monitors, or managing strategies across symbols and timeframes — it's a daily pain point.

Every time someone raises this, the thread dies with the same answer:

“No, you can’t.”

And that answer has been the same for years.

It’s no wonder developers leave this ecosystem to write for other platforms. When the simplest requests get ignored, and the response isn’t “We’ll consider it” or “It’s on the roadmap,” but simply “No” — that’s not a healthy developer relationship.

MetaQuotes could have added a function like:

ChartSetPosition(chart_id, x, y);
ChartTile(columns, rows);

Years ago. Many years ago. It’s a trivial engineering problem. Yet here we are.

 
Robert Northen #:

I'm not surprised by the answer — but I am disappointed. In fact, I'm beyond disappointed. I'm frustrated, and frankly, baffled.

There is a huge disconnect between developers and the MetaTrader platform when basic, fundamental functionality like chart window positioning is not — after all these years — exposed to the API. This isn’t some complex feature. This isn't asking for deep integration into external systems or AI-driven charting. This is basic GUI control — the ability to lay out chart windows in a user-defined grid, a feature expected from any modern trading platform.

The fact that users are still having to ask for this in 2025 is honestly embarrassing. This isn't technically difficult. It's not some unsolved computer science problem. It's simply a feature MetaQuotes has chosen not to provide — for reasons nobody can explain.

Other platforms — NinjaTrader, MultiCharts, Sierra Chart, even TradingView — all allow proper workspace management. It's part of respecting your users' workflows. MetaTrader simply doesn't. And this isn't a minor omission. For anyone trading multiple charts, using multiple monitors, or managing strategies across symbols and timeframes — it's a daily pain point.

Every time someone raises this, the thread dies with the same answer:

“No, you can’t.”

And that answer has been the same for years.

It’s no wonder developers leave this ecosystem to write for other platforms. When the simplest requests get ignored, and the response isn’t “We’ll consider it” or “It’s on the roadmap,” but simply “No” — that’s not a healthy developer relationship.

MetaQuotes could have added a function like:

Years ago. Many years ago. It’s a trivial engineering problem. Yet here we are.

I don't agree. MT5 is a trading platform, not a general application coding environment, so while I agree it would be nice to have such possibilities in the API, it's not correct to blame MetaQuotes for it. Having an API to work with the windows is not in the core features of a trading platform. I doubt any of the platform you mentioned provide any API to position the chart window. By the way, if these platforms are so good, why not using them instead of MT5 ?

I am not particularly defending MetaQuotes, they do a lot of good things, provide a lot of things including APIs, and they also have a lot of weaknesses. Mainly the global unreliability of the platform and features. Anyway, I could write a lot about it but that's not the point.

Additionally it's me who answered you, not MetaQuotes (I am not related to MQ in any way), so you don't even know what they would answer. I can only encourage you to better manage your frustration, which I understand very well, such rant as you did is just useless.

 
Alain Verleyen #:

I don't agree. MT5 is a trading platform, not a general application coding environment, so while I agree it would be nice to have such possibilities in the API, it's not correct to blame MetaQuotes for it. Having an API to work with the windows is not in the core features of a trading platform. I doubt any of the platform you mentioned provide any API to position the chart window. By the way, if these platforms are so good, why not using them instead of MT5 ?

I am not particularly defending MetaQuotes, they do a lot of good things, provide a lot of things including APIs, and they also have a lot of weaknesses. Mainly the global unreliability of the platform and features. Anyway, I could write a lot about it but that's not the point.

Additionally it's me who answered you, not MetaQuotes (I am not related to MQ in any way), so you don't even know what they would answer. I can only encourage you to better manage your frustration, which I understand very well, such rant as you did is just useless.

I hear what you're saying, and I appreciate you taking the time to reply in a constructive way. But I still disagree with the premise.

The argument that "it's a trading platform, not an application environment" doesn't really hold up when you look at how far MetaTrader has evolved. This isn’t just a simple trading terminal anymore. They’ve spent years pushing MQL as a full-fledged development environment — object-oriented programming, GUI libraries, event handling, file systems, databases, HTTP APIs… it’s all there. You can write fully interactive applications inside MT5, from dashboards to license managers to algorithmic trading systems. So why does it suddenly become "out of scope" when it comes to laying out chart windows inside the workspace?

And let’s be honest — this isn't some outlandish request. The terminal already has ALT+R for tiling charts. The terminal already manages chart positions — it’s just that the logic isn’t exposed to us. Adding a simple function like ChartTile(rows, columns) or ChartSetPosition() wouldn’t be revolutionary. It’s just finishing the job. In fact, it’s baffling that it hasn’t been done already.

Regarding the comparison to other platforms — it’s simply not true that this kind of functionality doesn't exist elsewhere. NinjaTrader, Sierra Chart, MultiCharts — they all have proper workspace management. Some do expose that through APIs, but more importantly, it’s built into the platform at the GUI level in a way that makes the issue irrelevant. You can define layouts, manage screens, save profiles. MetaTrader lags embarrassingly behind in this area, and it’s been that way for years.

As for "why not use another platform" — believe me, many of us do. But MetaTrader has strengths that are hard to replace — broker access, low barriers to deployment, lightweight algotrading — and that’s why people stick around. But sticking around doesn’t mean we shouldn’t expect basic quality-of-life improvements. Quite the opposite. If anything, it’s the fact that I want to continue using it that makes it so frustrating when simple things like this get ignored year after year.

And look — I get it. You’re not MetaQuotes. My frustration isn’t directed at you personally. But let’s not pretend this is an unreasonable rant. This exact complaint has been posted on the forum, in one form or another, for well over a decade. The fact that the answer is still “no, you can’t” in 2025 says a lot. People get tired of repeating the same requests and getting the same dismissive responses.

MetaTrader gets a lot of things right — no argument there. But it also has rough edges that never seem to get polished. This is one of them.
 
Robert Northen #"beyond disappointed", "frustrated, and frankly, baffled", "huge disconnect", "basic, fundamental functionality", "embarrassing", "nobody can explain", "developers leave this ecosystem", "not a healthy developer relationship", "trivial engineering problem", "Yet here we are", "doesn't really hold up", "let’s not pretend this is an unreasonable rant", "over a decade", "says a lot".

I fully understand your point, Robert, and to be honest, I share much of the functional need you're raising. Having control over chart window layout is something many of us would definitely appreciate being exposed through the API.

But frankly, I think the strength of your message gets diluted by the tone. What could be a legitimate and valuable suggestion ends up sounding more like accumulated frustration, and that tends to close more doors than it opens. I know it’s not ill-intentioned, but sometimes separating criticism from frustration helps it land better.

Also, it’s worth remembering that not everything that seems "trivial" from the outside necessarily is. We don’t know whether there are technical, architectural, or even commercial reasons behind not exposing certain features. I’m not saying it’s right, just that assuming it’s indifference may not be entirely fair.

 
Robert Northen #:
I hear what you're saying, and I appreciate you taking the time to reply in a constructive way. But I still disagree with the premise.

The argument that "it's a trading platform, not an application environment" doesn't really hold up when you look at how far MetaTrader has evolved. This isn’t just a simple trading terminal anymore. They’ve spent years pushing MQL as a full-fledged development environment — object-oriented programming, GUI libraries, event handling, file systems, databases, HTTP APIs… it’s all there. You can write fully interactive applications inside MT5, from dashboards to license managers to algorithmic trading systems. So why does it suddenly become "out of scope" when it comes to laying out chart windows inside the workspace?

And let’s be honest — this isn't some outlandish request. The terminal already has ALT+R for tiling charts. The terminal already manages chart positions — it’s just that the logic isn’t exposed to us. Adding a simple function like ChartTile(rows, columns) or ChartSetPosition() wouldn’t be revolutionary. It’s just finishing the job. In fact, it’s baffling that it hasn’t been done already.

Regarding the comparison to other platforms — it’s simply not true that this kind of functionality doesn't exist elsewhere. NinjaTrader, Sierra Chart, MultiCharts — they all have proper workspace management. Some do expose that through APIs, but more importantly, it’s built into the platform at the GUI level in a way that makes the issue irrelevant. You can define layouts, manage screens, save profiles. MetaTrader lags embarrassingly behind in this area, and it’s been that way for years.

As for "why not use another platform" — believe me, many of us do. But MetaTrader has strengths that are hard to replace — broker access, low barriers to deployment, lightweight algotrading — and that’s why people stick around. But sticking around doesn’t mean we shouldn’t expect basic quality-of-life improvements. Quite the opposite. If anything, it’s the fact that I want to continue using it that makes it so frustrating when simple things like this get ignored year after year.

And look — I get it. You’re not MetaQuotes. My frustration isn’t directed at you personally. But let’s not pretend this is an unreasonable rant. This exact complaint has been posted on the forum, in one form or another, for well over a decade. The fact that the answer is still “no, you can’t” in 2025 says a lot. People get tired of repeating the same requests and getting the same dismissive responses.

MetaTrader gets a lot of things right — no argument there. But it also has rough edges that never seem to get polished. This is one of them.

I will not address all your points. Let's drop discussion about other platforms as anyway it's useless. Let's also drop the trading or general application environment.

So let's focus on the main points :

1. Miguel already addressed it. I am a software developer selling applications, if someone is asking about some new feature in the way you did, I will answer politely but firmly : this is not a way to communicate that is acceptable. Though if what you are asking for is not in my plan, or if I find the idea good but with low priority I would answer : maybe but I don't know when. Will you start a rant ? That will not help, believe me.

2. MetaQuotes has it's own business model. They provide the client platform for free. The provide it to millions of people : to the masses. In the last 10 years, I have exchanged a lot of time (or just read) with MetaQuotes CEO and it's recurring argument, and he is RIGHT. Our personal needs, or even our small business needs are absolutely not the same as the needs and goals of MQ. Their results just prove it, they have a quasi monopole on desktop trading platform.

3. MetaQuotes will big compared to us, individual or small team, remains a small company with limited resources and man power, they just can't fulfil all the requests. It's not by choice, it's real world economic life of a business company, simple as that.

4. Of course, I got your frustration. I understand it very well, and feel it myself very often. After almost 14 years working with MT4 and MT5, dealing with MetaQuotes, I can say you there is only 1 solution : be as much independent of what they "could" do or provide. Use what is provided as is, when it's reliable enough (not always the case) and suitable. Find a workaround for what they don't provide (even if they say "it's on the roadmap", it can take years to get a promised feature, or it can even change and be cancelled). And if you can't work around for some reasons, then change your plan and idea. Don't wait about them, don't hope anything, it will help to avoid and limit frustrations.

 
Miguel Angel Vico Alba #:

I fully understand your point, Robert, and to be honest, I share much of the functional need you're raising. Having control over chart window layout is something many of us would definitely appreciate being exposed through the API.

But frankly, I think the strength of your message gets diluted by the tone. What could be a legitimate and valuable suggestion ends up sounding more like accumulated frustration, and that tends to close more doors than it opens. I know it’s not ill-intentioned, but sometimes separating criticism from frustration helps it land better.

Also, it’s worth remembering that not everything that seems "trivial" from the outside necessarily is. We don’t know whether there are technical, architectural, or even commercial reasons behind not exposing certain features. I’m not saying it’s right, just that assuming it’s indifference may not be entirely fair.

Yes, fair enough — you’re right about the tone. It’s 100% coming from built-up frustration. Not aimed at anyone here, but yes… probably came across heavier than I meant.

That said, the frustration’s real for a reason. This isn’t some wild feature idea. The terminal already knows how to handle chart layouts — ALT+R literally proves that. The logic’s there, it’s just not exposed. And that’s the bit that drives me up the wall. It’s not that it can’t be done — it’s that we’ve just never been given access to it.

And yeah, totally hear you on the “what looks trivial might not be” point. I’ve been round enough messy codebases to know that the stuff that looks simple from the outside can easily be an absolute nightmare behind the scenes. No argument there.

But at the same time, not everything’s a technical blocker. Sometimes it’s just no one cared enough to prioritise it, or it slipped through the net. And fair enough — companies have to pick their battles. But this is one of those things that’s been brought up time and time again for years. The silence is half the frustration.

Honestly, if I didn’t care about the platform, I wouldn’t even bother posting. I wouldn’t waste the energy. MT does a lot right — that’s why I’m still here — but stuff like this feels like proper low-hanging fruit that’s just been left sitting there forever.

Anyway, appreciate the honest reply. Point taken. Hopefully the actual request still stands on its own, minus the rant.

- Rob

 
Alain Verleyen #:


4. Of course, I got your frustration. I understand it very well, and feel it myself very often. After almost 14 years working with MT4 and MT5, dealing with MetaQuotes, I can say you there is only 1 solution : be as much independent of what they "could" do or provide. Use what is provided as is, when it's reliable enough (not always the case) and suitable. Find a workaround for what they don't provide (even if they say "it's on the roadmap", it can take years to get a promised feature, or it can even change and be cancelled). And if you can't work around for some reasons, then change your plan and idea. Don't wait about them, don't hope anything, it will help to avoid and limit frustrations.

I fully agree. As developers, we need to focus on what we can do with the tools available. If at some point our needs happen to align with MQ’s roadmap, great... but relying on that is not a strategy. Fighting windmills, as Don Quixote did, only drains time and motivation.

That said, user feedback remains essential and helps shape the platform over time, but we should approach development with a mindset of adaptability and self-reliance. Limitations will always exist; what matters is how we navigate around them. 😉