Skip to content

closeShort: Close every open sell (short) position, on all symbols

View as Markdown

Close every open sell (short) position, on all symbols.

Field Type Required Unit Description
license string Yes text Your license key. In examples it is written YOUR_LICENSE_KEY.
action string Yes text Always closeShort. Case-sensitive.

The webhook rejects unknown fields, missing required fields and wrong types with HTTP 422 before anything is queued. Field names are case-sensitive.

Replace YOUR_LICENSE_KEY with your key. Send the body as the alert message in TradingView, or with any HTTP client.

{
"license": "YOUR_LICENSE_KEY",
"action": "closeShort"
}

After a successful run the MT5 Experts log shows:

Closed position <ticket> successfully (symbol: <symbol>)
Close Summary: Success = <n>, Failed = <n>

In the dashboard, the command appears in Command History on the License Details page. What each status means.

Where you see it Message or code Cause Fix
MT5 Experts log No open positions found. The account has no open positions. Nothing to do.
Broker, MT5 return code 10018 Market is closed The market for a symbol is closed; that position stays open. Send the command again when the market is open.
  • Applies to all symbols. To close one symbol only, use closeSymbol with direction short.
  • Only positions in the EA’s trade scope are closed (by default, trades opened by this EA).

Verified for EA v1.9 · dashboard 2026-10-05 · reviewed by Claude Code (owner review pending)

Report a problem with this page

Trading involves substantial risk of loss. ZB Connector is software only; it does not provide investment advice, signals or brokerage services.