Trademinator controls the number of consecutive same operations thanks to the EXCHANGE_MAX_SELLING_OPERATIONS and EXCHANGE_MAX_BUYING_OPERATIONS parameters. However, when Trademinator sends a buying or a selling order, it does not review if the operation can be fulfilled completely. If it does not, the exchange creates an order that waits to be taken by other traders.
The problem with this approach is that the waiting order is not always fulfilled in one spot. Depending on the actions of others traders, it could be done in one order or in other orders. The complementary orders are count and they affect the algorithm action.
This proposal suggests doing a count of the taken orders. Therefore, the algorithm will execute its actions without being disrupted by variables it can not control. As a consequence, the values of the EXCHANGE_MAX_*_OPERATION and the hardcode 10 min TTL for orders can be reduced.
Please note that this approach will only work with exchanges such as Poloniex that make a difference in the fee for taking and making orders.
- Implemented in 0.0.3.