Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use languages other than MQL4 on MetaTrader4?

I have a task of migrating a C# market strategy to MetaTrader.

  1. Is there any way to automate that job? (For example, is it possible to parse C# into it's AST, then make the translation?)

  2. Does MetaTrader accept other languages by any means?

like image 371
MaiaVictor Avatar asked May 24 '13 09:05

MaiaVictor


2 Answers

Approach the task Bottom-Up -- Architecture-wise

Yes, you can simplify the trouble and make MT4 become a Node, which is immediately connected peer-to-peer to your current C# Market Strategy.

This alowed me to operate a cluster-based computing communicating massively parallel with a crowd of MT4 nodes.

MT4 can become anEventFEED-er Node via a more complex "Scaleable Formal Cummunication Framework" in a very intelligent manner.

Do you wish to have a CLI-interface to command your MT4 node(s) -- one as anEventFEED-er, another as anXtoACTOR Node -- selectively, with a syntax & grammar of CLI-instructions ( not speaking about test-automation et al ...)?

Do you wish to have a central <syslog> daemon to off-load HFT-traffic loaded MT4 node(s) and automate + administer scripted monitoring & maintenance tasks?

Do you wish to have an external GPU-computing engine/cluster to communicate in a Client/Server manner with MT4 EA on a per-tickEvent basis?

ZeroMQ and/or nanomsg frameworks will allow you to design and develop many-to-many ( node-network-wise ) & any-to-any ( implementation language-wise ) systems.

MT4/MQL4 has a direct smart wrapper for ZeroMQ >>> thanks to Austen Conrad on GitHub MQL4ZMQ

ZeroMQ >>> thanks to it's great team has many language bindings - C/C++, Python, Java, R, even Erlang, ...

So your Project may jump start on rock solid grounds & independent of any particular architecture gridlocks ( DLL moving sands et al )

Engineering built-ins save you a lot of time and efforts and avoid re-inventing wheel

like image 156
user3666197 Avatar answered Oct 19 '22 22:10

user3666197


How about GET/POST requests and a web based text API service?

You could use your C# strategy to update a web based text file with a ternary signal:

-1 SELL
 0 HOLD
 1 BUY

Then use MQL4 to read the text file once a minute for a trade signal.

As far as technically how to do this; unfortunately I'm a python programmer not MQL4 or C#, so I can't help.

like image 23
litepresence Avatar answered Oct 20 '22 00:10

litepresence