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

modify_order lots parameter ignored #41

Closed bartoszalksnin closed 4 months ago

bartoszalksnin commented 8 months ago

Hi, i'm testing the modify_order call and it seems that lots parameter is ignored on the MQL side?

both mql5 and mql4

if (isPosition)
      res = trade.PositionModify(ticket, stopLoss, takeProfit);
   else
      res = trade.OrderModify(ticket, price, stopLoss, takeProfit, ORDER_TIME_GTC, expiration);

..

bool res = OrderModify(ticket, price, stopLoss, takeProfit, expiration);

i can only see usage of this parameter in logs If it's not possible to change order size with lots should we remove this from modify_order?

elvinex commented 4 months ago

Hi, You are right. Having a lots parameter does not make sense since the mql4/5 functions do not use it. Modifying the lot size would be a partial close or new entry. I removed the lots parameter. Thanks!