-
Notifications
You must be signed in to change notification settings - Fork 0
03 Execution and MT5 Bridge
High-performance quantitative models often fail in production due to execution latency, broker spread widening, and adverse selection. TriDomainMoE incorporates a native C-extension bridge to MetaTrader 5 (src/execution/mt5_bridge.py) operating with sub-20ms latency and four institutional defense vectors.
Live MT5 Market Feed ────> Extract Microstructure (Tick/M5) ────> TriDomainMoE Inference
│
┌─────────────────────────────────────────────────────────────────────┘
▼
Vector 1: Anti-Adverse Order Book Shield (OFI < -0.20 or VPIN > 0.65?) ──> REJECT
│ PASS
▼
Vector 3: Router Shannon Entropy Gating (H >= 1.00 -> High Drift Filter) ──> REJECT
│ PASS
▼
Conviction Check (Sizing s_t >= 0.20?) ──> REJECT
│ PASS
▼
Dispatch MT5 Market Order with Hard Stop-Loss & Take-Profit Brackets
│
▼
Vector 2: Active Position Breakeven Ratchet Polling Loop (Every 5s)
│
└──> When Profit >= +1.5σ (50% TP distance) ──> Ratchet SL to Entry + Spread + 2 pts
-
BUY Rejection: Triggered if
normalized_ofi < -0.20orvpin > 0.65. Prevents buying into informed institutional limit book dumps. -
SELL Rejection: Triggered if
normalized_ofi > 0.20orvpin > 0.65. Prevents shorting directly into aggressive buyer absorption walls.
-
Trigger: Once unrealized profit reaches
$50%$ of the Take-Profit distance ($+1.5\sigma$ price expansion). -
Action: An asynchronous
TRADE_ACTION_SLTPmodification ratchets the Stop-Loss to$\text{Entry Price} + \text{Floating Spread} + 2\text{ points}$ . -
Effect: Guarantees that profitable trades cannot reverse into a loss, converting potential round-trip losses into risk-free scratch trades ($\ge
$0.00$ ).
-
Condition: Router entropy
$H(g) \ge 1.00$ . -
Action: Elevates the minimum directional drift forecast requirement:
$$|\hat{y}_{\text{pred}}| \ge 0.0380 \quad (\text{raised from standard } 0.0300)$$ - Effect: Prunes choppy low-conviction trades when technical and macro experts disagree during market consolidation.
- Condition: Trading hour between 12:00 UTC and 18:00 UTC.
-
Action: Scales conviction sizing
$s_t$ by$+15%$ . - Effect: Concentrates exposure during peak institutional depth of book and narrowest broker spreads.
Lot sizing is calculated dynamically from the MT5 account balance and stop-loss distance:
-
Default Risk per Trade:
$0.20%$ ($0.0020$ ). - Single-Deal Constraint: Only one active position is permitted per symbol. Concurrent duplicate exposure is strictly prohibited to maintain prop-firm drawdown safety.
-
Slippage & Spread Guard: If the floating spread exceeds
$2.5\times$ the rolling 20-period median spread, trade dispatch is paused until liquidity returns.
TriDomainMoE: Institutional Multi-Domain Mixture of Experts
Official Web Portal • GitHub Source • Hugging Face Model Hub
Cryptocurrency Research Grants (USDT TRC20): TC8TFkemSFGEeBPF5ZQKbmjK97FVEGwrwc
- Home
- 01 Architecture & Foundations
- 02 Feature Engineering Pipeline
- 03 Execution & MT5 Bridge
- 04 Continual ReCAP Adaptation
- 05 Verified 1-Year Benchmark
- 06 Live Trading & Deployment
- 07 Hugging Face Model Zoo
- Asset: USDT (Tether)
- Network: TRON (TRC20)
-
Address:
TC8TFkemSFGEeBPF5ZQKbmjK97FVEGwrwc