This repository contains high-performance execution components for MetaTrader 5, designed for institutional environments. The architecture emphasizes modularity through Object-Oriented Programming (OOP), low-latency asynchronous execution, and robust risk management.
- NotionalGuard: Dynamic margin and exposure monitoring to prevent over-leveraging and maintain compliance with institutional risk parameters.
- OrderFlowRouter: High-speed order routing utilizing
OrderSendAsyncto minimize execution latency and slippage. - SkeletonEA: Optimized entry point for HFT-style strategies, demonstrating efficient handling of tick data and state management.
The system is designed to act as the execution layer for external signal generators. It supports integration with bridge protocols such as ZeroMQ or Named Pipes, allowing for a decoupled architecture where quantitative models run in optimized environments (C++, Python, or Rust) and execute via this MQL5 layer.
- OOP Design: Strict adherence to class structures for maintainability and scalability.
- Async Handling: Non-blocking order execution to ensure the trading engine remains responsive during high volatility.
- Error Handling: Comprehensive checking of trade server return codes (Retcodes) to ensure execution integrity.
This software and its documentation are the exclusive property of Castle Trade LLC. Unauthorized copying, distribution, or use of these materials constitutes a violation of intellectual property laws and contractual agreements. Access is granted solely for professional evaluation purposes.
© 2026 Castle Trade LLC. All rights reserved.