darwinex / dwxconnect

Seamlessly link any Trading Strategy in ANY programming language to Darwinex liquidity via MetaTrader 4 or 5. DWX Connect is your very own, fully customizable Trading API!
BSD 3-Clause "New" or "Revised" License
158 stars 84 forks source link

Strategy hedge mode #3

Closed xbotuk closed 2 years ago

xbotuk commented 2 years ago

The API does not support hedge modes for multiple strategies to go long/short independently on the same symbol, like the Magic number concept in MT4. It is very important especially for integration with Interactive Brokers who provides net long or net short positions, but not parallel strategies.

Can you enable virtual hedging to this API please?

elvinex commented 2 years ago

Hi,

Thank you very much for your question. I am not sure if I understand the issue correctly.

Our aim with dwxconnect was to code a bridge from python/java to MT4/MT5, which would be easier to use and (hopefully) with a less things that can go wrong compared to the available ZeroMQ solution. Therefore, it basically just mirrors what is going on in MT4. For example, you can also specify different magic numbers for different strategies.

If I understand your question correctly, you would like the python side to virtually hedge positions and only send the resulting net position to MT4?

Having different positions on both sides would add considerably to the complexity. We are currently not planning to add such a feature, but we are always happy to review pull requests with added features if they are in line with the goals for this project (mainly keeping it simple).