Can I use languages ​​other than MQL4 on MetaTrader4?

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

  • Is there any way to automate this work? (For example, is it possible to parse C # into an AST, and then make a translation?)

  • Does MetaTrader accept other languages ​​in any way?

+6
source share
4 answers

Bottom-Up Approach - Architecture-wise

Yes, you can simplify the problem and make MT4 Node, which is immediately connected by a peer to your current C # strategy.

This helped me organize cluster computing , communicating a massive parallel with a crowd of MT4 nodes.

MT4 can become anEventFEED -er Node with a more sophisticated “scalable formal message processing scheme” in a very smart way.

Do you want to have a CLI interface for the MT4 node (s) command - one as anEventFEED -er, the other as anXtoACTOR Node - selectively, with the syntax and grammar of the CLI instructions (not to mention test-automation, etc.)?

Do you want to have a central < syslog daemon to load HFT traffic loaded by MT4 node (s) and automate + administer monitoring and script maintenance tasks?

Do you want the external GPU engine / cluster engine to interact with the client / server using MT4 EA based on per-tickEvent?

The basics of ZeroMQ and / or nanomsg will allow you to design and develop many-to-many (node-based) and any-to-any (language implementation systems).

MT4 / MQL4 has a direct intelligent shell for ZeroMQ →> thanks to Austen Conrad on GitHub MQL4ZMQ

ZeroMQ →> thanks to the large team, there are many language bindings - C / C ++, Python, Java, R, even Erlang, ...

Thus, your project can start in an abrupt manner and is not dependent on any specific network gridlock (DLL moving sands et al)

Engineering built-in features save a lot of time and effort and do not reinvent the wheel

+2
source

the short answer is no, but there is the ability in mql to import DLLs. so you can wrap your C # lib with the C ++ / cli library, which is functionally expanded through the export of functions, you can even start the timer in mql and implement a rudimentary message pump.

Update: MT4 can only access regular unmanaged DLL calls. the reason you should use the C ++ shell is because C ++ has the ability to create unmanaged standard calls. any other language in which you can create standard calls can also work.

In addition, you need a shell if you want to use other languages ​​that do not support standard calls. You can just write all your code in C ++, and the whole shell concept will be obsolete.

+1
source

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

You can use your C # strategy to update a text file on the Internet with a triple signal:

 -1 SELL 0 HOLD 1 BUY 

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

How technically how to do it; Unfortunately, I am a python programmer, not MQL4 or C #, so I can not help.

+1
source

Yes, you can use C # using some third-party solutions, such as NQuotes http://www.nquotes.net/ , which is essentially a ready-made DLL for general use (as Dmitry said, you can create your own, but it requires a little work).

0
source

Source: https://habr.com/ru/post/945762/


All Articles