MQL5 to Python Translation Workspace

VerifiedSafe

Translates MQL5 indicators to Python with automatic accuracy validation (correlation ≥ 0.999). Enables headless market data export via Wine and the MetaTrader5 API, ideal for automating data workflows and porting custom indicators.

Sby Skills Guide Bot
DevelopmentAdvanced
6/2/2026
Claude Code
#mql5#python#metatrader#indicator-translation#data-export

Recommended for

Automated summary

This skill enables seamless translation of MQL5 indicators to Python and automated market data export from MetaTrader 5, with validation and self-correction.

Strengths

  • Automated headless export of OHLCV data and built-in indicators
  • Correlation-based validation (>=0.999 threshold) ensuring accuracy
  • Documented self-correction to prevent recurring errors
  • End-to-end workflow from translation to validation

Limitations

  • Cannot access custom indicator buffers via the Python API
  • Requires MetaTrader 5 to be running beforehand
  • Relies on Wine/CrossOver for Windows Python execution
When to use it

Use this skill when you need to export MetaTrader 5 market data or translate MQL5 indicators to Python with rigorous validation.

When not to use it

Do not use it when working with custom indicators that are not accessible through the MT5 API.

Security analysis

Safe
Quality score85/100

Skill provides a bounded workflow for exporting MT5 data via Wine Python; no destructive or exfiltrating commands.

No concerns found

How this analysis is made

Examples

Export OHLCV data from MetaTrader 5
Export EURUSD M1 OHLCV data with RSI and SMA indicators for the last 5000 bars using the headless Wine Python export script.
Translate MQL5 indicator to Python
Translate this MQL5 indicator to Python and validate the output against the original with correlation >= 0.999.
Validate indicator accuracy
Validate the Python implementation of the RSI indicator against the MQL5 reference by running the export and comparing the arrays.

name: python-workspace description: Python workspace for MQL5 integration. TRIGGERS - MetaTrader 5 Python, mt5 package, MQL5-Python setup. allowed-tools: Bash, Read, Write

MQL5-Python Translation Workspace Skill

Seamless MQL5 indicator translation to Python with autonomous validation and self-correction.


When to Use This Skill

Use this skill when the user wants to:

  • Export market data or indicator values from MetaTrader 5
  • Translate MQL5 indicators to Python implementations
  • Validate Python indicator accuracy against MQL5 reference
  • Understand MQL5-Python workflow capabilities and limitations
  • Troubleshoot common translation issues

Activation Phrases: "MQL5", "MetaTrader", "indicator translation", "Python validation", "export data", "mql5-crossover workspace"


Core Mission

Main Theme: Make MQL5-Python translation as seamless as possible through:

  1. Autonomous workflows (headless export, CLI compilation, automated validation)
  2. Validation-driven iteration (>=0.999 correlation gates all work)
  3. Self-correction (documented failures prevent future mistakes)
  4. Clear boundaries (what works vs what doesn't, with alternatives)

Project Root: ~/Library/Application Support/CrossOver/Bottles/MetaTrader 5/drive_c


Workspace Capabilities Matrix

WHAT THIS WORKSPACE CAN DO

1. Automated Headless Market Data Export (v3.0.0)

Status: PRODUCTION (0.999920 correlation validated)

What It Does:

  • Fetches OHLCV data + built-in indicators (RSI, SMA) from any symbol/timeframe
  • True headless via Wine Python + MetaTrader5 API
  • No GUI initialization required (cold start supported)
  • Execution time: 6-8 seconds for 5000 bars

Command Example:

CX_BOTTLE="MetaTrader 5" \
WINEPREFIX="$HOME/Library/Application Support/CrossOver/Bottles/MetaTrader 5" \
wine "C:\\Program Files\\Python312\\python.exe" \
  "C:\\users\\crossover\\export_aligned.py" \
  --symbol EURUSD --period M1 --bars 5000

Use When: User needs automated market data exports without GUI interaction

Limitations: Cannot access custom indicator buffers (API restriction)

Reference: /docs/guides/WINE_PYTHON_EXECUTION.md


Reference Documentation

For detailed information, see:


Troubleshooting

| Issue | Cause | Solution | | ---------------------------- | ---------------------------- | ---------------------------------------------------- | | Wine Python not found | CrossOver/Wine not installed | Install CrossOver, verify bottle path | | MT5 API connection failed | MetaTrader not running | Launch MetaTrader 5 before running export | | Correlation below 0.999 | Indicator mismatch | Verify warmup periods, check calculation alignment | | Custom indicator not working | API restriction | Use CSV export from MT5, not Python API | | UnicodeDecodeError | Windows path encoding | Use raw strings for Windows paths in Wine | | Symbol not found | Wrong symbol format | Use exact MT5 symbol name (e.g., EURUSD not EUR/USD) | | Timeout on export | Too many bars requested | Reduce bar count, default 5000 is safe | | Permission denied | Wine prefix incorrect | Set WINEPREFIX to correct CrossOver bottle path |

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/mql5-to-python-translation-workspace-mm8o5239/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/mql5-to-python-translation-workspace-mm8o5239' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/mql5-to-python-translation-workspace-mm8o5239/download' --output '.skill-downloads/mql5-to-python-translation-workspace-mm8o5239/SKILL.md.part' && mv '.skill-downloads/mql5-to-python-translation-workspace-mm8o5239/SKILL.md.part' '.skill-downloads/mql5-to-python-translation-workspace-mm8o5239/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash, Read, Write

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/mql5-to-python-translation-workspace-mm8o5239/SKILL.md' && test -s '.skill-downloads/mql5-to-python-translation-workspace-mm8o5239/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/python-workspace' && cp -R '.skill-downloads/mql5-to-python-translation-workspace-mm8o5239' '.claude/skills/python-workspace'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/mql5-to-python-translation-workspace-mm8o5239'

openskills read 'mql5-to-python-translation-workspace-mm8o5239'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/mql5-to-python-translation-workspace-mm8o5239/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills