New article How to Export Quotes from МetaTrader 5 to .NET Applications Using WCF Services is published:
I have copied your source files and recompiled them to run.
But I had a crash of the MT5.
How can I debug / troubleshoot on this?
1. The first, try to use the compiled files, located in the archive bin.rar
For example, the directory of MetaTrader5 client terminal is "C:\Program Files\MetaTrader 5\"
Let's create new folder for the expert QExporter.mq5 for example "QE", in the folder "C:\Program Files\MetaTrader 5\MQL5\Experts\"
C:\Program Files\MetaTrader 5\MQL5\Experts\QE\QExporter.mq5 (1615 bytes)C:\Program Files\MetaTrader 5\MQL5\Experts\QE\QService.mqh (4380 bytes)C:\Program Files\MetaTrader 5\MQL5\Libraries\QExport.dll (5632 bytes)C:\Program Files\MetaTrader 5\MQL5\Libraries\QExport.Service.dll (7168 bytes)C:\Program Files\MetaTrader 5\MQL5\Libraries\QExportWrapper.dll (27648 bytes)C:\Program Files\MetaTrader 5\WindowsClient\QExport.Client.dll (6656 bytes)C:\Program Files\MetaTrader 5\WindowsClient\QExport.dll (5632 bytes)C:\Program Files\MetaTrader 5\WindowsClient\WindowsClient.exe (12288 bytes)
Then after the compilation of QExporter.mq5 the compiled file QExporter.ex5 will appear in the directory:
C:\Program Files\MetaTrader 5\MQL5\Experts\QE\QExporter.ex5 (6706 bytes)
After attaching it to the chart EURUSD,H1 and running WindowsClient.exe, I have got the following picture:
I have tested it at buld 249 (18 Feb).
Fist of all, i would try to debug mql5 sources to find the function that causes an error - set up breakpoints before all dll functions calling. Unfortunately, i couldnt attach dll to terminal.exe for debugging because terminal has been crashed. Maybe in new builds its possible
Also i want to know which OS do you use. I have 32bit OS and therefore i didnt have an ability to check it on 64bit systems.
And have you tried to run compiled files?
And one more thing, please try to run ConsoleService and ConsoleClient in the solution. Maybe problem isnt related to mql or wrapper library.
Finnaly, i suppose you've just forgotten to create (or copy) file terminal.exe.config. Please try it.
It is a good news for MQL5 can use wrap dll of NET.
Why Mql4 can not use such mode to comm with Net wrapped DLL ?
I have the same problem.
2010.07.27 12:11:09 Experts Initializing of QExporter (EURUSD,H1) failed
I managed to get both this working with both 32bit MT5 and, after recompling for x64, managed to get it working with 64bit MT5....however, when I try to run the EA in the strategy tester they both crash spectacularly.
I would like to use this to export some price and indicator data into a database table to do some analysis with external software.....any ideas what could be causing this crash? This is the closest I've come to a working solution so far.
i got crash in strategy tester too. in normal mode, it's ok.
is anyone got solution yet?
Awesome work Alexander. I had never coded in C# before and I was looking at getting MT5 quotations to flow through in Excel without using DDE-Server.
I finally made it work by tweaking your code with MT5 32 bits. Next step x64.