Skip to content

Commit

Permalink
Order: Adds missing order filling (fixes GH-664)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed May 21, 2023
1 parent 9a02fd5 commit 6ae9d03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Order.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@ class Order : public SymbolInfo {
_request.position = ::PositionGetInteger(POSITION_TICKET);
_request.symbol = ::PositionGetString(POSITION_SYMBOL);
_request.type = NegateOrderType((ENUM_POSITION_TYPE)::PositionGetInteger(POSITION_TYPE));
_request.type_filling = GetOrderFilling(_request.symbol);
_request.volume = _lots;
_request.price = _price;
_request.deviation = _deviation;
Expand All @@ -925,10 +926,11 @@ class Order : public SymbolInfo {
_request.action = TRADE_ACTION_DEAL;
_request.comment = _comment != "" ? _comment : odata.GetReasonCloseText();
_request.deviation = orequest.deviation;
_request.symbol = orequest.symbol;
_request.type = NegateOrderType(orequest.type);
_request.type_filling = GetOrderFilling(orequest.symbol);
_request.position = oresult.deal;
_request.price = SymbolInfo::GetCloseOffer(orequest.type);
_request.symbol = orequest.symbol;
_request.volume = orequest.volume;
Order::OrderSend(_request, oresult, oresult_check);
if (oresult.retcode == TRADE_RETCODE_DONE) {
Expand Down

0 comments on commit 6ae9d03

Please sign in to comment.