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 Sep 26, 2024
1 parent eb8cb7d commit e891a07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Order.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,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 @@ -476,10 +477,11 @@ class Order : public SymbolInfo {
_request.action = TRADE_ACTION_DEAL;
_request.comment = _comment;
_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.price = SymbolInfo::GetCloseOffer(orequest.type);
_request.volume = orequest.volume;
Order::OrderSend(_request, oresult, oresult_check);
if (oresult.retcode == TRADE_RETCODE_DONE) {
Expand Down

0 comments on commit e891a07

Please sign in to comment.