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
342 stars 227 forks source link

[Enhancement Request] expose the trading constants so we can create/modify orders symbolically #72

Open metaperl opened 4 years ago

metaperl commented 4 years ago

the sample code in the README shows how to create a default order but not how to modify such an order. Without enumerated types for the various order properties, we cannot write easy to read code to modify the order.

The constants are even in the code as comments:

         // OP_BUY = 0
         // OP_SELL = 1
         // OP_BUYLIMIT = 2
         // OP_SELLLIMIT = 3
         // OP_BUYSTOP = 4
         // OP_SELLSTOP = 5

but they should be in the code as actual values so someone importing the module can use them.

integracore2 commented 4 years ago

Thank you for raising this @metaperl 🙂

You make a good point indeed. We'll escalate this and commit a patch to the code as soon as we can.

Many thanks for your valuable inputs - much appreciated!