File size: 5,078 Bytes
c382c53 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | ---
license: mit
library_name: ml-trader
tags:
- trading
- machine-learning
- xauusd
- gold
- mt5
- metatrader5
- python
- rust
---
# ML-3m-trader: XAUUSDc 3-Minute Timeframe ML Trading System
An end-to-end proprietary machine learning pipeline for trading XAUUSDc (Gold) on the 3-minute timeframe. This system utilizes a high-performance architecture bridging Python for data processing and model orchestration with Rust for high-frequency execution components.
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/)
[](https://www.rust-lang.org/)
[](#techstack)
[](https://huggingface.co/algorembrant)
## Project Overview
The ML-3m-trader repository provides a robust framework for automated trading, featuring a hybrid implementation designed for speed and reliability. The core logic involves sophisticated feature engineering and a classification-based approach to market decision-making. Read paper at [SSRN](https://ssrn.com/abstract=6143486) for brigde system framework.
> [!NOTE]
> **Confidentiality Notice**: The specific machine learning algorithms and proprietary trading strategies utilized in this system are currently private. The documentation focuses on infrastructure and architectural workflows.
## Key Features
- **Multi-Language Architecture**: Seamless integration between Python processing and Rust execution.
- **Data Acquisition**: Automated 3-minute OHLCV data fetching.
- **Proprietary Labeling**: Advanced market state labeling engine with built-in risk-reward and spread filtering.
- **Vectorized Backtesting**: High-speed, realistic execution modeling accounting for slippage and spread.
- **Comprehensive Metrics**: Detailed performance analysis including Sharpe, Sortino, and Profit Factor.
## Output Preview
The following visualizations illustrate the system's internal processing and performance evaluation.
### Feature Processing Workflow

The diagram above details the data transformation pipeline from raw market indicators to model-ready features.
### Performance Metrics

The image above showcases the standardized backtesting report generated after a full simulation run.
## System Architecture
```mermaid
graph TD
A[MetaTrader 5] -->|OHLCV Data| B(Data Fetcher)
B --> C(Feature Engineering)
C --> D(Labeling Engine)
D --> E(ML Pipeline)
E --> F{Backtesting}
F -->|Performance| G(Metrics Report)
F -->|Execution| H[Live Trading Interface]
subgraph "Hybrid Processing"
C
D
E
end
```
## Project Structure
Detailed overview of all project components:
```text
ML-3m-trader/
βββ python_version/
β βββ main.py
β βββ config.py
β βββ data_fetcher.py
β βββ diag_mt5.py
β βββ features.py
β βββ labeler.py
β βββ model.py
β βββ backtester.py
β βββ metrics.py
β βββ README.md
βββ rust_ml_trader/
β βββ src/
β β βββ main.rs
β β βββ backtester.rs
β β βββ config.rs
β β βββ data_fetcher.rs
β β βββ features.rs
β β βββ labeler.rs
β β βββ metrics.rs
β β βββ model.rs
β β βββ types.rs
β βββ .gitignore
β βββ Cargo.toml
β βββ GUIDE.md
β βββ LICENSE
β βββ README.md
βββ SUM3API (local)/
β βββ MQL5/
β β βββ Experts/
β β β βββ ZmqPublisher.mq5
β β βββ Include/
β β βββ Libraries/
β βββ Rustmt5-chart/
βββ feature_process.png
βββ LICENSE
βββ metrics.png
βββ requirements.txt
βββ STACKS.md
βββ sractch.md
```
## Usage
For detailed technical documentation, please refer to [STACKS.md](STACKS.md).
### Quick Start (Python)
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Run the full pipeline:
```bash
python python_version/main.py run
```
### Quick Start (Rust)
1. Build the project:
```bash
cd rust_ml_trader
cargo build --release
```
2. Execute backtest:
```bash
cargo run --release
```
## Citation
If you use this repository in your research or project, please cite it as follows:
```bibtex
@misc{albeos2026ml3mtrader,
author = {Rembrant Oyangoren Albeos},
title = {ML-3m-trader: XAUUSDc 3-Minute Timeframe ML Trading System},
year = {2026},
publisher = {Hugging Face},
journal = {Hugging Face Repository},
howpublished = {\url{https://huggingface.co/algorembrant/ML-3m-trader}}
}
```
|