2026-02-27 13:33:46 +00:00
<p align="center">
<img src="./Images/AiDataGenByLeo_banner.png" alt="AiDataGenByLeo Logo" width="1150" height="175"/>
</p>
2026-02-08 19:03:22 +00:00
2026-02-27 13:33:46 +00:00
<p align="center">
2026-07-06 11:20:10 -05:00
Build AI-powered trading systems with automatic feature generation, via a declarative YAML config schema, and 85+ built-in features.
2026-02-27 13:33:46 +00:00
</p>
<p align="center">
<img src="https://img.shields.io/badge/Language-MQL5-1B6CA8?style=flat-square"/>
<img src="https://img.shields.io/badge/Platform-MetaTrader%205-0D1B2A?style=flat-square"/>
<img src="https://img.shields.io/badge/Author-nique__372%20And%20Leo-C9D6DF?style=flat-square&logoColor=white"/>
<img src="https://img.shields.io/badge/Articles-mql5.com-1B6CA8?style=flat-square"/>
2026-04-14 21:57:30 +00:00
<a href="./LICENSE">
<img src="https://img.shields.io/badge/License-Nique%26Leo%20NL--ND-red.svg"/>
</a>
2026-02-27 13:33:46 +00:00
</p>
2026-02-08 19:03:22 +00:00
2026-03-02 02:47:31 +00:00
2026-02-08 19:03:22 +00:00
---
## Main Features
2026-07-06 16:20:39 +00:00
### YAML Schema (FGBLC) configuration
2026-07-06 10:52:28 -05:00
2026-07-06 11:20:10 -05:00
AiDataGenByLeo uses a declarative YAML schema (**FGBLC** — * Feature Generator By Leo Config * ) to define, at a single glance, which features are calculated,
in what order, and how they map onto the output vector or matrix — all without touching a single line of code.
2026-07-06 10:52:28 -05:00
2026-07-06 16:20:39 +00:00
#### YAML Example
2026-07-06 10:52:28 -05:00
2026-07-06 15:07:40 +00:00
```yaml
name: Generador de features
config:
cols: 2
output:
type: AIDATALEO_GEN_VECTOR
contexts:
- mode: custom
idx: [1, 2]
data:
- class: News_GetValue
prefix: ~
params: { event_code: "core-cpi-mm", country_code: US}
- class: News_HasEventToday
prefix: ~
params: { event_code: "core-cpi-mm", country_code: US}
2026-02-08 19:03:22 +00:00
```
2026-07-06 11:28:10 -05:00
> A Schema JSON file has been provided so you can validate your own YAML, or you can insert it into your code editor:
> [Json Schema](./GenericData/ShemaJson/Schema.json)
2026-07-06 10:52:28 -05:00
2026-02-08 19:03:22 +00:00
### Automatic Data Generation
```mql5
2026-07-06 11:20:10 -05:00
// Parse yaml from TSN Ecositem YamlParserByLeo
2026-07-06 15:07:40 +00:00
TSN::CYamlParser yml;
yml.Assing(my_yaml_src);
yml.CorrectPadding();
yml.Parse();
2026-02-08 19:03:22 +00:00
// Initialize feature generator
2026-07-06 15:07:40 +00:00
m_generator.Init(yml.GetRoot());
2026-02-08 19:03:22 +00:00
// Generate feature vector on each bar
m_generator.ObtenerDataEnVector(vector, curr_time);
```
### Python Training Pipeline
```python
# Load generated data
df = pd.read_csv('data.csv')
# Train classifier
model = train_classifier(df, selected_features)
# Export to ONNX
export_model(model, 'model.onnx')
```
### Real-Time AI Predictions
```mql5
// In your EA
if(m_predictor.CheckOpenOrder(trade_config)) {
// AI approved - execute trade
OpenPosition(type, entry, sl, tp);
}
```
2026-03-02 02:47:31 +00:00
### EasySb - ICT EA with AI
2026-04-10 20:50:29 +00:00
- **Production-Ready EA:** Complete trading system with AI integration, ONNX model included, and SetFile: https://forge.mql5.io/nique_372/EasySbAi
2026-03-02 02:47:31 +00:00
2026-02-08 19:03:22 +00:00
---
## Repository Structure
```
AiDataGenByLeo/
├── GenericData/ # Classifier, DSL Parser, Feature Factory
2026-02-27 13:34:26 +00:00
├── Py/ # Python script for model training
└── Images/ # Repo banner
2026-02-08 19:03:22 +00:00
```
---
## License
2026-02-27 13:33:46 +00:00
2026-04-14 22:18:57 +00:00
**[Read Full License ](./LICENSE )**
2026-02-08 19:03:22 +00:00
By downloading or using this repository, you accept the license.
---
2026-03-02 02:39:41 +00:00
## Requirements
2026-03-12 16:48:23 +00:00
- For python see the `requirements.txt`
- For project see the `dependencies.json`
2026-02-08 19:03:22 +00:00
2026-04-22 00:12:20 +00:00
---
## Docs
2026-07-06 11:20:10 -05:00
- YAML Schema Estructure: [Parser README ](https://forge.mql5.io/nique_372/AiDataGenByLeo/src/branch/main/GenericData/ShemaJson/README.md ).
2026-04-22 00:12:20 +00:00
- Features docs: [AiDataGenByLeoFeaturesDocs ](https://forge.mql5.io/nique_372/AiDataGenByLeoFeaturesDocs ).
2026-03-02 02:39:41 +00:00
---
## Installation
2026-02-08 19:03:22 +00:00
2026-07-06 15:08:59 +00:00
```bash
cd "C:\Users\YOUR_USER\AppData\Roaming\MetaQuotes\Terminal\YOUR_ID\MQL5\Shared Projects"
tsndep install "https://forge.mql5.io/nique_372/AiDataGenByLeo.git"
```
- Requires the `tsndep` package — available on [PyPI ](https://pypi.org/project/tsndep ). It automatically downloads and installs all declared dependencies.
- If any dependency is private or paid, the install will fail for that package — check [dependencies.json ](./dependencies.json ) and contact me for access.
2026-03-02 02:39:41 +00:00
---
## Quick Start
2026-02-08 19:03:22 +00:00
```bash
# 1. Generate training data
# Run EA in training mode
# Data will be saved to: TerminalPath/Files/Common/EasySbAi/data.csv
# 2. Train model
# Execute the Python script
# 3 files will be generated in TerminalPath/Files/Common/EasySbAi/
# Copy the ONNX model and scaler file to:
# AiDataGenByLeo/Examples/EAs/TTrades/EasySb/res/
# 3. Run the EA
# Execute Ea.mq5 with the training parameter set to false
```
---
## Disclaimer
**Trading involves substantial risk of loss.**
- This software is a technical tool, not financial advice
- Past performance does not guarantee future results
- You are solely responsible for your trading decisions
- Always test thoroughly before deploying with real capital
- Use appropriate risk management in all operations
The authors assume no liability for trading losses, system failures, or any damages arising from the use of this software.
---
## Contact and Support
- **Platform:** [MQL5 Community ](https://www.mql5.com/es/users/nique_372 )
- **Profile:** https://www.mql5.com/es/users/nique_372/news
- **Issues:** For bug reports or questions
---
**Copyright © 2026 Nique-Leo. All rights reserved.**