Skip to content

Commit

Permalink
Order: Improves retcode on invalid request
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Jul 30, 2023
1 parent 8294b59 commit 73d8ebc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Order.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ class Order : public SymbolInfo {
// break;
case TRADE_RETCODE_INVALID:
default:
odata.Set<unsigned int>(ORDER_PROP_LAST_ERROR, oresult.retcode);
odata.Set<unsigned int>(ORDER_PROP_LAST_ERROR, fmax(oresult.retcode, oresult_check.retcode));
if (OrderSelect()) {
Refresh(true);
if (!IsClosed()) {
Expand Down

0 comments on commit 73d8ebc

Please sign in to comment.