Download MetaTrader 5

Discussion of article "How to Export Quotes from МetaTrader 5 to .NET Applications Using WCF Services"

To add comments, please log in or register
Publish your article and win recognition from thousands of traders!
MetaQuotes Software Corp.
Moderator
181341
MetaQuotes Software Corp. 2010.02.19 13:43 

New article How to Export Quotes from МetaTrader 5 to .NET Applications Using WCF Services is published:

This article will show you one of the ways to export quotes from MetaTrader 5 to applications written in .NET.

Author: Alexander

sgfxtrader
54
sgfxtrader 2010.02.22 04:42  

Hi!

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?

Thanks!

Quantum
175
Quantum 2010.02.22 11:08  

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).

Alexander
1512
Alexander 2010.02.22 17:10  
sgfxtrader:

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?

Hello,

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.

okwh
1631
okwh 2010.03.13 16:40  

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 ? 

Alexander
1512
Alexander 2010.03.16 09:15  
DxdCn posted # :

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 ? 

It is possible to use hybrid dll in mt4, the problem is mql4 doesnt have structures. But its not that big deal, you can pass a few parameters instead of structure.
Roman Trchalik
29
Roman Trchalik 2010.07.27 14:14  
sgfxtrader:

Hi!

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?

Thanks!


I have the same problem.

2010.07.27 12:11:09    Experts    Initializing of QExporter (EURUSD,H1) failed

joeykruger
3
joeykruger 2011.04.13 21:11  

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.  


Joe

zephyrrr
107
zephyrrr 2012.02.10 07:58  

i got crash in strategy tester too. in normal mode, it's ok.

is anyone got solution yet?

ns11
3
ns11 2012.03.05 22:54  
Thanks for your great work!
marianis
5
marianis 2012.07.11 08:03  

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.

SM 

12
To add comments, please log in or register