AiDataGenByLeo/README.md
Nique_372 934df2e82e
2026-07-06 11:28:10 -05:00

4.9 KiB

AiDataGenByLeo Logo

Build AI-powered trading systems with automatic feature generation, via a declarative YAML config schema, and 85+ built-in features.


Main Features

YAML Schema (FGBLC) configuration

AiDataGenByLeo uses a declarative YAML schema (FGBLCFeature 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.

YAML Example

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}  

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

Automatic Data Generation

// Parse yaml from TSN Ecositem YamlParserByLeo
TSN::CYamlParser yml;
yml.Assing(my_yaml_src);
yml.CorrectPadding();
yml.Parse();

// Initialize feature generator
m_generator.Init(yml.GetRoot());

// Generate feature vector on each bar
m_generator.ObtenerDataEnVector(vector, curr_time);

Python Training Pipeline

# 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

// In your EA
if(m_predictor.CheckOpenOrder(trade_config)) {
   // AI approved - execute trade
   OpenPosition(type, entry, sl, tp);
}

EasySb - ICT EA with AI


Repository Structure

AiDataGenByLeo/
├── GenericData/   # Classifier, DSL Parser, Feature Factory
├── Py/            # Python script for model training
└── Images/        # Repo banner

License

Read Full License

By downloading or using this repository, you accept the license.


Requirements

  • For python see the requirements.txt
  • For project see the dependencies.json

Docs


Installation

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. 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 and contact me for access.

Quick Start

# 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


Copyright © 2026 Nique-Leo. All rights reserved.