Appearance
Are you an LLM? You can read better optimized documentation at /safety-and-reliability/execution-safety.md for this page in Markdown format
Execution Safety
A validated signal is not the end of the safety story -- it is the beginning of the execution story. Between validation and your broker, TTMT wraps every operation in multiple fault-tolerance mechanisms. Automatic safety pauses halt trading when errors accumulate. Speed controls prevent broker overload. Smart retries handle temporary failures gracefully. And hard volume caps ensure no single trade can exceed your configured risk, regardless of what the signal says.
Automatic Safety Pause
The automatic safety pause is a per-account safety mechanism that automatically halts trade execution when too many errors occur in quick succession. This prevents TTMT from repeatedly hammering a failing broker, which would waste margin on rejected orders and risk unpredictable behavior.
How It Works
Trip Thresholds
| Failure Type | Threshold to Trip | Why |
|---|---|---|
| Transient failures | 5 consecutive | Network glitches, temporary broker issues |
| Permanent failures | 2 consecutive | Broker rejects, invalid parameters |
Transient failures are things like network timeouts, temporary server errors, and rate limit responses. They are expected to resolve on their own.
Permanent failures are hard rejections -- invalid symbol, account suspended, insufficient permissions. Two of these in a row strongly suggest a systemic problem, not bad luck.
Recovery
| Parameter | Value |
|---|---|
| Cooldown (paused state) | 30 seconds |
| Successes to resume (testing) | 2 consecutive |
After 30 seconds in the paused state, the system transitions to a testing phase and allows a limited number of operations through. If 2 consecutive operations succeed, trading resumes normally. If any operation fails, it immediately returns to the paused state for another 30-second cooldown.
Per-Account Isolation
Each MetaTrader account has its own independent automatic safety pause. If your Demo account's broker is having issues, your Live account continues trading normally. Problems on one account never cascade to another.
TIP
The safety pause state is visible in the dashboard header under the Trading Status indicator. If you see a yellow or red indicator, the safety pause may be active or in a recovery test.
Global Broker Health Monitor
While the automatic safety pause is per-account, the Global Broker Health Monitor watches for patterns across all of your accounts.
| Parameter | Value |
|---|---|
| Failure threshold | 3 failures across any account |
| Pause duration | 60 seconds |
| Scope | All accounts on the same broker |
If 3 failures occur across any combination of accounts within a short window, the global monitor pauses all trading for 60 seconds. This catches broker-wide outages faster than waiting for individual safety pauses to activate.
Why Both?
The automatic safety pause handles account-specific problems (wrong credentials, symbol not found). The global monitor handles broker-wide problems (maintenance window, server overload). Together, they cover both failure modes.
Speed Control
Your broker has rate limits. Exceeding them causes rejections, which trigger automatic safety pauses, which halt trading. The speed control prevents this cascade by controlling the flow of operations.
| Parameter | Value |
|---|---|
| Max concurrent operations | 5 |
| Minimum gap between operations | 200ms |
| Processing order | First-come-first-served with priority support |
How It Works
All broker operations (place order, modify position, close position, query state) go through the speed control. If 5 operations are already in flight, new operations wait their turn. The minimum gap between operations prevents burst patterns that some brokers reject.
Priority Levels
Not all operations are equal. The speed control supports priority levels:
| Priority | Operations |
|---|---|
| High | Position close, breakeven modification, stop-loss update |
| Normal | New order placement, TP modification |
| Low | Position queries, symbol info, balance checks |
High-priority operations (especially protective ones like breakeven) are processed first. This ensures that capital-protecting operations are never delayed by routine queries.
Smart Retry System
When a broker operation fails, TTMT determines whether and how to retry it. Different operation types have different retry strategies because the consequences of failure vary.
7 Retry Profiles
| Profile | Operations | Initial Delay | Max Delay | Max Retries | Wait Pattern |
|---|---|---|---|---|---|
| Breakeven | SL modification to breakeven | 200ms | 2s | 5 | Increasing |
| TP Modification | Take-profit level changes | 500ms | 5s | 3 | Increasing |
| Order Placement | New market/limit orders | 1s | 10s | 3 | Increasing |
| Position Close | Closing open positions | 500ms | 5s | 4 | Increasing |
| Order Cancel | Cancelling pending orders | 500ms | 5s | 3 | Increasing |
| Query | Read operations (balance, positions) | 1s | 30s | 5 | Increasing |
| Connection | Broker reconnection | 2s | 60s | 10 | Increasing |
Why Breakeven Is Fastest
The breakeven retry profile has the shortest delays because breakeven modifications are capital-protecting. When TP1 has been hit and you need to move the stop loss to entry, every second of delay is a second where a reversal could turn a winning trade into a losing one.
Increasing Wait Times
All profiles use increasing wait times between retries to avoid hammering a failing system:
Each retry waits roughly twice as long as the previous one, up to a maximum:
Breakeven example: 200ms → 400ms → 800ms → 1.6s → 2s (capped)
Order placement: 1s → 2s → 4s (max 3 retries)
Connection: 2s → 4s → 8s → 16s → 32s → 60s (capped)Error Handling
TTMT's retry decisions are driven by a centralized error handling system that maps over 60 MetaTrader error codes into 7 categories.
Error Categories
| Category | Meaning | Retry? | Examples |
|---|---|---|---|
| TRANSIENT | Temporary issue, likely to resolve | Yes | Network timeout, server busy, requote |
| PERMANENT | Hard failure, will not resolve on retry | No | Invalid symbol, account disabled, invalid volume |
| MARKET_CLOSED | Market is not open for trading | No | Weekend, holiday, outside trading hours |
| RATE_LIMITED | Too many requests | Yes (with delay) | Broker rate limit, connection throttle |
| CONNECTION | Connection lost or degraded | Yes (with reconnect) | Connection closed, authentication expired |
| SUCCESS | Operation succeeded (no error) | N/A | Normal completion |
| UNKNOWN | Unrecognized error code | Cautious retry | New/unexpected error codes |
Error Code Mapping (Selected)
| MT5 Code | Meaning | Category |
|---|---|---|
| 10004 | Requote | TRANSIENT |
| 10006 | Request rejected | PERMANENT |
| 10010 | Request confirmed | SUCCESS |
| 10013 | Invalid request | PERMANENT |
| 10014 | Invalid volume | PERMANENT |
| 10015 | Invalid price | TRANSIENT |
| 10016 | Invalid stops | PERMANENT |
| 10018 | Market closed | MARKET_CLOSED |
| 10019 | Insufficient funds | PERMANENT |
| 10024 | Too many requests | RATE_LIMITED |
| 10030 | Order already filled | PERMANENT |
| -2 | Position not found | PERMANENT |
| 4753 | Position not found (variant) | PERMANENT |
The full mapping covers 60+ error codes. This is the single source of truth for all error handling decisions throughout the system -- every part of TTMT that handles broker errors uses the same centralized classification rather than implementing its own logic.
WARNING
The UNKNOWN category exists for error codes that are not yet mapped. These are retried cautiously (1-2 attempts) and logged for investigation. If you see UNKNOWN errors in your logs, they represent edge cases that the system handles safely but has not yet categorized.
Volume Caps
This is one of TTMT's most important safety features: the volume specified in a Telegram signal is never used. Every trade's lot size is calculated independently from your configured risk settings.
Why Signal Volume Is Ignored
Signal providers often include lot sizes in their signals (e.g., "Buy EURUSD 0.50 lots"). These volumes are meaningless for your account because:
- The provider's account size is different from yours.
- The provider's risk tolerance is different from yours.
- Some providers exaggerate volumes for marketing.
- A typo in the volume could be catastrophic.
TTMT always calculates volume from your settings -- your account balance, your risk percentage, and your configured volume mode.
Hard Volume Caps
Even after calculating from your settings, TTMT enforces absolute maximum limits:
| Risk Level | Maximum Total Volume | When Applied |
|---|---|---|
| Normal | 5.0 lots | Default risk level |
| Mid | 7.5 lots | 1.5x risk multiplier |
| High | 10.0 lots | 2.0x risk multiplier |
These caps are non-negotiable. Even if your calculated volume exceeds them due to a large account balance or aggressive risk percentage, the system caps at the maximum. This protects against configuration errors and edge cases in the volume calculation.
Per-Asset Overrides
You can set per-asset-class maximum volumes that are even more restrictive than the global caps. For example:
| Asset Class | Custom Cap |
|---|---|
| Forex | 2.0 lots |
| Gold | 0.50 lots |
| Indices | 1.0 lots |
Per-asset caps override the global maximum when they are lower. They never override it to be higher.
How These Systems Work Together
The execution safety systems are not independent silos -- they form an integrated defense:
- Automatic safety pause decides if trading is allowed.
- Global health checks for broker-wide issues.
- Volume caps constrain position size.
- Speed control manages operation flow.
- Error handling determines the response to failures.
- Smart retry handles retriable failures with appropriate wait times.
- Successes feed back to safety pause recovery.
Related Pages
- Safety & Reliability Overview -- The five layers of defense
- Signal Validation -- Safety checks before execution
- Position Protection -- What happens after execution
- Fast Market Conditions -- How execution safety handles volatile markets
- Risk Management -- Position sizing and volume calculation

