Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orders are opened, instead of being closed #707

Closed
kenorb opened this issue Aug 12, 2023 · 0 comments · Fixed by EA31337/EA31337#385 or #708
Closed

Orders are opened, instead of being closed #707

kenorb opened this issue Aug 12, 2023 · 0 comments · Fixed by EA31337/EA31337#385 or #708
Labels
bug MQL5 MQL5 compability
Milestone

Comments

@kenorb
Copy link
Member

kenorb commented Aug 12, 2023

For some reason on Order::OrderClose, we're losing value for request.position, and MT5 opens the new order, instead of closing the existing one. It's a side effect of using ambiguous TRADE_ACTION_DEAL action in MT5 for both opening and closure of the orders/positions/trades/whatever, this didn't happen when closing tickets in MT4, because it was much clearer. Using ambitious action for both operations only increases risk that it can happen again.

@kenorb kenorb added the bug label Aug 12, 2023
@kenorb kenorb added this to the v2.013.1 milestone Aug 12, 2023
@kenorb kenorb added the MQL5 MQL5 compability label Aug 12, 2023
kenorb added a commit that referenced this issue Apr 23, 2024
* v3.001-dev-new:
  Fixes new lines [end-of-file-fixer]
  GHA: Compile: Support for workflow calls
  GHA: Compile: Skips clean-up by default
  Adds vscode's extensions for devcontainer
  Adds initial config for .devcontainer/devcontainer.json
  GHA: Fixes compilation workflows
  Refs EA31337/Strategy-TDI#1. MA-targeted changes regarding input MA method and iMAOnArray implementation which input is now changed to native array (from ValueStorage).
  Refs EA31337/EA31337-indicators-other#8. Added IndicatorLegacy.h file to allow using MQL5 versions of iNAME() indicators like iMA(), iRSI() in MQL4. Used to run MQL5 indicators in MQL4.
  Refs EA31337/EA31337-indicators-other#8. Added underscores to some function parameter names  to prevent conflicts with global variables.
  Refs #11. Renamed "index" variable names into "_idx" to prevent conflicts with global variables. Also added new CreateObject() specialization to Draw.mqh. Added #ifdef to Terminal.define.h to prevent redefinition of defines.
  Indi_Fractals: Fixes code typo
  Final fix for orders are opened instead of being closed for both MT4 and MT5 (fixes GH-707)
  Fixes C++ error: no matching function for call
kenorb added a commit that referenced this issue Apr 24, 2024
* v3.001-dev:
  GHA: Compile: Fixes uploading artifacts after compilation
  GHA: Compile: Ignores compiling platform files
  Fixing CompileTest
  Fixes compilation errors on build 4275
  GHA: Test: Includes compile workflow
  Fixes new lines [end-of-file-fixer]
  GHA: Compile: Support for workflow calls
  GHA: Compile: Skips clean-up by default
  Adds vscode's extensions for devcontainer
  Adds initial config for .devcontainer/devcontainer.json
  GHA: Fixes compilation workflows
  Refs EA31337/Strategy-TDI#1. MA-targeted changes regarding input MA method and iMAOnArray implementation which input is now changed to native array (from ValueStorage).
  Refs EA31337/EA31337-indicators-other#8. Added IndicatorLegacy.h file to allow using MQL5 versions of iNAME() indicators like iMA(), iRSI() in MQL4. Used to run MQL5 indicators in MQL4.
  Refs EA31337/EA31337-indicators-other#8. Added underscores to some function parameter names  to prevent conflicts with global variables.
  Refs #11. Renamed "index" variable names into "_idx" to prevent conflicts with global variables. Also added new CreateObject() specialization to Draw.mqh. Added #ifdef to Terminal.define.h to prevent redefinition of defines.
  Indi_Fractals: Fixes code typo
  Final fix for orders are opened instead of being closed for both MT4 and MT5 (fixes GH-707)
  Fixes C++ error: no matching function for call
kenorb added a commit that referenced this issue Apr 27, 2024
* tag 'v2.013.1':
  Final fix for orders are opened instead of being closed for both MT4 and MT5 (fixes GH-707)
  Fix for orders are opened instead of being closed (GH-707)
  Order: Improves error handling
  Order:Trade: Improves error handling
  Workaround for closing order conditions after orders are loaded from active pool (GH-705)
  Adds close retry counter (GH-703)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug MQL5 MQL5 compability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant