Skip to content

Commit

Permalink
Order: Adds case when market is closed (GH-700)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Jul 28, 2023
1 parent 891807e commit 8294b59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Order.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,10 @@ class Order : public SymbolInfo {
odata.Set(ORDER_PROP_REASON_CLOSE, _reason);
Refresh(true);
return true;
case TRADE_RETCODE_MARKET_CLOSED:
// Market is closed.
// @todo: Re-try closing.
// break;
case TRADE_RETCODE_INVALID:
default:
odata.Set<unsigned int>(ORDER_PROP_LAST_ERROR, oresult.retcode);
Expand Down

0 comments on commit 8294b59

Please sign in to comment.