I have a task of migrating a C# market strategy to MetaTrader.
Is there any way to automate that job? (For example, is it possible to parse C# into it's AST, then make the translation?)
Does MetaTrader accept other languages by any means?
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With