darwinex / dwx-zeromq-connector

Wrapper library for algorithmic trading in Python 3, providing DMA/STP access to Darwinex liquidity via a ZeroMQ-enabled MetaTrader Bridge EA.
https://blog.darwinex.com/zeromq-interface-python-r-metatrader4/
BSD 3-Clause "New" or "Revised" License
341 stars 227 forks source link

How to set Maximum orders for one symbol? #111

Closed ZixiSu closed 3 years ago

ZixiSu commented 3 years ago

image Hi team,

In the EA, we can define the maximum lots we can enter, but if I want to define for every symbol, the maximum order is 2. For example, the maximum orders for all is 10 lots, for EURUSD maximum is 2 lots, XAUUSD maximum is 2 lots, XAGUSD maximum is 2 lots, AUDUSD maximum is 2 lots, GBPUSD maximum is 2 lots.

How can change the EA

elvinex commented 3 years ago

Hi, To clean up the issues, we decided to close issues with general questions that have been inactive for a long while.

Your idea is of course possible, but would require some work. I would start by learning how you can count the positions of a specific symbol in mql, for example here: https://www.mql5.com/en/forum/128351 And then add your code to the DWX_OpenOrder() function.