nautilus_trader icon indicating copy to clipboard operation
nautilus_trader copied to clipboard

MetaTrader 5 Integration

Open kaustv-datta opened this issue 1 year ago • 7 comments

Feature Request

Since a lot of brokers are transitioning to the MetaTrader 5 trading platform, it would be nice to have a MT5 - NautilusTrader integration.

There is an official MT5 python library-

  • https://pypi.org/project/MetaTrader5/
  • https://www.mql5.com/en/docs/python_metatrader5

A drawback - as of today, the python package works only on windows OS.

kaustv-datta avatar Jul 02 '24 10:07 kaustv-datta

Then we have to skip it as for now, as it only works in windows

NextThread avatar Jul 02 '24 12:07 NextThread

One suggestion:

It is possible to create a Rest API on top of metatrader. In that case, using Fastapi + Metatrader library for instance, it is possible to create all necessary routes (similar to binance).

For this scenario, it is only required to host a windows machine on cloud to work as a Rest API, and nautilus can stay in other machine (linux /mac/windows) using docker.

gmcaixeta avatar Jul 07 '24 00:07 gmcaixeta

There are metatrader docker containers out there we can use. We could also take the same approach that was done with interactive brokers.

seekersoftec avatar Jul 26 '24 15:07 seekersoftec

There are metatrader docker containers out there we can use. We could also take the same approach that was done with interactive brokers.

I've been using this project, and it works fine in linux:

MetaTrader5-Docker-Image

gmcaixeta avatar Aug 21 '24 00:08 gmcaixeta

There are metatrader docker containers out there we can use. We could also take the same approach that was done with interactive brokers.

I've been using this project, and it works fine in linux:

MetaTrader5-Docker-Image

Thanks, I created something similar, it still needs some work to be fully polished though, it has an auto-login feature where it does the initial login process for you.

metatrader-terminal

seekersoftec avatar Sep 19 '24 10:09 seekersoftec

There are metatrader docker containers out there we can use. We could also take the same approach that was done with interactive brokers.

I've been using this project, and it works fine in linux: MetaTrader5-Docker-Image

Thanks, I created something similar, it still needs some work to be fully polished though, it has an auto-login feature where it does the initial login process for you.

metatrader-terminal

That's very cool @seekersoftec , congrats!

In order to avoid one metatrader container per bot , I am testing using Fast APi on top of metatrader, to centralize all the order and data request in only one metatrader container. This may lose performance, but it saves space on cloud.

gmcaixeta avatar Sep 19 '24 23:09 gmcaixeta

There are metatrader docker containers out there we can use. We could also take the same approach that was done with interactive brokers.

I've been using this project, and it works fine in linux: MetaTrader5-Docker-Image

Thanks, I created something similar, it still needs some work to be fully polished though, it has an auto-login feature where it does the initial login process for you. metatrader-terminal

That's very cool @seekersoftec , congrats!

In order to avoid one metatrader container per bot , I am testing using Fast APi on top of metatrader, to centralize all the order and data request in only one metatrader container. This may lose performance, but it saves space on cloud.

Thanks! Quite an interesting problem, although it was not considered when I first took the Fast API route(thought it was going to be a long road), finally opted for performance instead when I considered a use case for RL. trade_flow

seekersoftec avatar Oct 04 '24 21:10 seekersoftec