You will have to write MQL code (a program) to export the data.
Usually you would export it to a file in a form that will be readable by Excel, for example a CSV file.
If you want real-time communications, then you will have to use DLL calls to communicate with Excel directly.
EDIT: Another alternative is use the Python integration.
You will have to write MQL code (a program) to export the data.
Usually you would export it to a file in a form that will be readable by Excel, for example a CSV file.
If you want real-time communications, then you will have to use DLL calls to communicate with Excel directly.
That is strange! It has been asked many times on the forum, and if you search the CodeBase there are several publications of example code for exporting trade history, most of them to CSV which Excel can read, but also in real-time via the use of DDE.
Is that sufficient reason to ignore them?
You asked — "Is it possible to Export trades from MT5 to Excel in real time?" — then the answer is obviously yes, based on those examples.
You also asked — "How would I go about connecting MT5 to Excel and exporting trades in real time to Excel automatically?"
Even if outdated, they are still references to "how" to do it. By studying them, you may discover that some are still fully functional or only need minor corrections.
If however, you don't want to waste your time studying them, learning, correcting or implementing your own version, then consider using the Freelance section and hire someone to do it for you.
EDIT: You also stated "struggled finding anyone talking about it before" and "people talking about exporting real time data in the form of prices etc but not trade history", yet by your own admission, you did find several examples of what you are looking for. They may not be exactly what you want, but the information is there to start you off.

- 2022.06.26
- www.mql5.com
Is that sufficient reason to ignore them?
You asked — "Is it possible to Export trades from MT5 to Excel in real time?" — then the answer is obviously yes, based on those examples.
You also asked — "How would I go about connecting MT5 to Excel and exporting trades in real time to Excel automatically?"
Even if outdated, they are still references to "how" to do it. By studying them, you may discover that some are still fully functional or only need minor corrections.
If however, you don't want to waste your time studying them, learning, correcting or implementing your own version, then consider using the Freelance section and hire someone to do it for you.
EDIT: You also stated "struggled finding anyone talking about it before" and "people talking about exporting real time data in the form of prices etc but not trade history", yet by your own admission, you did find several examples of what you are looking for. They may not be exactly what you want, but the information is there to start you off.
So, I created a post to see if there was something obvious I was missing. Perhaps a current working version or perhaps someone may have responded and said "you cannot do that" or "it used to work with older versions but no longer with newer versions".
I had been searching for ages and hoped that by creating a post here, it would save some time.
Instead it sounds like it annoyed you.
It did not annoy me and I was not being rude! I was simply pointing out that sometimes things can be so obvious, that our minds don't recognise it because we are overwhelmed by the prospect of a daunting project.
But once we calm down and start looking at things more pragmatically, we find that there is actually a lot of information at our disposal and we just need to take it one step at a time in an organised way.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How would I go about connecting MT5 to Excel and exporting trades in real time to Excel automatically?
Thanks