setup.cash
MetaTrader Connector Guide
Production-grade setup, operation, and troubleshooting for MT4/MT5 -> setup.cash.
Quick start
Go live in under 10 minutes
- Create a setup.cash account and sign in.
- Open Connect MT page and generate Pairing Code + Connector Secret.
- Install SetupCashConnector.mq4 in MetaTrader 4 or SetupCashConnector.mq5 in MetaTrader 5 and compile.
- Enable Algo Trading + WebRequest URL (https://www.setup.cash).
- Attach EA to any chart and paste BaseUrl, PairingCode, ConnectorSecret.
- Confirm CONNECTED status in setup.cash and verify heartbeat/account values.
1) Generate secure pairing
- Go to `/connect/metatrader` and click `Generate Pairing`.
- Copy both values: `Pairing Code` and `Connector Secret`.
- Treat Connector Secret like an API key. Do not share it.
- If expired, generate a new pairing and replace values in EA inputs.
2) Install MetaTrader Expert Advisor
- Open MT4 or MT5, then go to `File`, then `Open Data Folder`.
- MT4: go to `MQL4/Experts` and place `SetupCashConnector.mq4` there.
- MT5: go to `MQL5/Experts` and place `SetupCashConnector.mq5` there.
- Open MetaEditor and compile the EA (no compile errors).
- Back in MT5, refresh Navigator and confirm EA appears under Experts.
3) MetaTrader permissions (required)
- Enable global `Algo Trading` button.
- Open `Tools`, then `Options`, then `Expert Advisors`.
- Enable `Allow WebRequest for listed URL`.
- Add `https://www.setup.cash` exactly.
4) Attach EA and configure inputs
- Attach EA to any chart and keep chart open.
- `BaseUrl`: `https://www.setup.cash`
- `PairingCode`: from setup.cash
- `ConnectorSecret`: from setup.cash
- `HeartbeatSeconds`: 10 (recommended)
- `PollSeconds`: 2 (recommended)
5) Verify connection and first command
- Return to `/connect/metatrader` and wait for `CONNECTED`.
- Confirm account snapshot updates (balance, equity, free margin).
- Confirm open positions and open orders appear in snapshot panels.
- Queue a very small test market order.
- Watch command status move from `PENDING` to `SENT` to `DONE`.
- Use `Close by Ticket` for a full lifecycle test.
Troubleshooting
Status stays DISCONNECTED
- Make sure PairingCode and ConnectorSecret are copied exactly.
- Pairing expires in 10 minutes. Generate a new one and retry.
- Confirm EA is attached to an active chart and Algo Trading is enabled.
WebRequest failed / HTTP errors in MT5 logs
- MetaTrader -> Tools -> Options -> Expert Advisors -> Allow WebRequest.
- Add exact URL: https://www.setup.cash
- Check firewall/VPS outbound HTTPS access.
Order command queued but not executed
- Keep MT5 terminal open (EA polls commands continuously).
- Check symbol name format (for some brokers: EURUSD, EURUSD.a, etc).
- Verify lot size/min volume and margin requirements in your broker.
Close by ticket fails
- Use the live ticket number from Open Positions.
- Ticket must belong to the same connected account.
- If position is already closed, command will return FAILED.
Security best practices
- Never share PairingCode + ConnectorSecret together.
- Regenerate pairing immediately if credentials leak.
- Use a dedicated MT5 terminal/VPS for automation.
- Keep OS and MT5 updated.
- Use broker-side protections (max lot, exposure limits).
Pro operations checklist
- Run on low-latency VPS near broker servers.
- Enable terminal auto-restart on VPS reboot.
- Monitor heartbeat freshness every minute.
- Review command failures and broker retcodes daily.
- Keep one connector per account for clean control.
Need hands-on support?
Include screenshots from MT5 Experts log, the Connect MT page status, and your username. We can diagnose quickly.
support@setup.cash