5

I've got a MT4 client setup on my machine and can successfully retrieve feeds. However, I have written a program using java to pull data using the FIX protocol. I'd like to know how my java program can pull the data that I see on my MT4 client terminal.

manlio
  • 18,345
  • 14
  • 76
  • 126
user1066568
  • 717
  • 3
  • 15
  • 32
  • 1
    Sounds like a question best asked on a MetaTrader forum. – Peter Lawrey Feb 07 '12 at 09:15
  • I am also searching for the solution of this problem. It is a boring process to export the data of all symbols I'm interested in using the History Center. I think until finding the answer I will write an MQL script to do this. But the Java solution would be the best. – Donato Szilagyi Jan 26 '13 at 16:17
  • 2
    @SzilagyiDonat - read the **ZeroMQ** bindings for `java` & use `MQL4ZMQ` wrapper from Austen Conrad to integrate your online cooperation between these two kind of Node-s. Best to start with Fig.60 & Fig.62 from the book [Code Connected, Vol.1] from Pieter Hintjens ( available online asPdf ), to get a bigger picture first, and then dive into your architecture needs top-down, not bottom up from lines of code. Worth a time. – user3666197 Jun 13 '14 at 12:25
  • @user1066568 do you know how to get data from MT4 ? – Tomasz Waszczyk Nov 06 '15 at 15:36

2 Answers2

2

Believe me when I say that Metatrader is not for the serious trader.
Bucketshops get newbies excited about code snippets that are cobbled together for MetaTrader.

If it is only the charting data you want, there is no need to reinvent the wheel, merely subscribe to a generic data service.

There are a variety of free chart data display packages available, jfree.org can display a wide variety of data...

If you want to place orders via a Java interface, there are several options:

manticore trader http://developer.berlios.de/projects/manticore/

open java trading system http://sourceforge.net/projects/ojts/

Of course all of the above assumes you are learning programming, and I recommend keeping trading out of it because you can better spend your time learning a more direct and coherent programming ideas into results method by using the correct tools.

For example: Ninjatrader is free to use and is able to connect directly to the exchange (several options for data as well). The code is dot Net and will compile so your execution will be fantastic compared to anything interpreted.

Kinetick has free end of day data.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
miniscule
  • 730
  • 3
  • 12
2

MetaTrader to any-process integration

MT4 can communicate both with your java FIX-Protocol_MEDIATOR and any other process Node included in whatever complicated distributed heterogeneous processing infrastructure with a use of an excellent ZeroMQ broker-less Scaleable Formal Communication Patterns messaging framework.

Benefits

Such approach saves our time as the grounds are rocks-solid. Such approach increases system robustness, as non-stop-able & fault-resilient high-level-of-abstraction Communication Behaviours can be developed and distributed among many various Nodes - be it java, C#/C++, Python, PHP, Erlang and many other, production-grade systems

Integration Constraints

MT4 has several given limits. Both lack of a soft-RealTime control over the process-flow and a limited inter-thread synchronisation make it a candidate for a lightweight thin-Node of the overall distributed solution. ZeroMQ, with it's low-latency & load-balancing capabilites has many advantages for such architecture already built-in.

Community
  • 1
  • 1
user3666197
  • 1
  • 6
  • 50
  • 92