interface
Skill17 starsChanged 7 months agoMITView on GitHub
Use the local MetaTrader 5 Python trading CLI at MQL5\Scripts\interface.py. Use when Codex needs to explain, run, validate, or troubleshoot command-line trading operations such as opening market or pending orders, setting or editing SL/TP, closing positions, canceling pending orders, listing opened trades or pending orders, reading recent trade history, or checking account and symbol details.
- Installs packages
4 other projects use a version of this.
Adopted by
Most recently taken up by
- fracazo/design-systemtheir own version, first seen Nov 8, 2026
- jeremy-farnault/claude-skillstheir own version, first seen Nov 3, 2026
- wheslleyrimar/BuildCLI-Agentstheir own version, first seen Oct 22, 2026
- calebnewtonusc/Chewbaccatheir own version, first seen Aug 11, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- calebnewtonusc/Chewbacca★ 8same name
- fracazo/design-system★ 4same name
- wheslleyrimar/BuildCLI-Agents★ 3same name
- jeremy-farnault/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- analyzeSkill
- candles-and-seriesSkill
- captions-davinciSkill
- compile-mql5Skill
- edit-davinciSkill
- expert-advisorsSkill
- forgeSkill
- gitSkill
- optimizationSkill
- orquestateSkill
- paint-objectsSkill
- run-backtestsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 6 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill for the local MT5 Python CLI wrapper located at:
- Very specific: line 93
Read recent history. The misspelled alias hystory is accepted for compatibility:
- Distinctive: line 100
Check account or symbol details:
- Very specific: line 109
Use --SL and --TP for absolute prices only.
- Distinctive: line 111
Use distance parameters when the user describes stops in points or pips:
- Very specific: line 118
Use --price for pending order entry price.
- Very specific: line 120
Use --stoplimit for buystoplimit and sellstoplimit orders.
- Very specific: line 122
Use --lot or --volume for trade volume.
- Very specific: line 124
Use --deviation for allowed slippage in points on market entries and closes.
- Very specific: line 126
Use --filling when the broker rejects the default filling mode.
- Very specific: line 128
Use --json when another script needs machine-readable output.
- Distinctive: line 132
Before sending live-trading commands, restate the exact operation in concrete terms: command, symbol, type, volume, price if pending, SL, …
- Very specific: line 134
If the user provides ambiguous stops like SL=23, ask whether they mean an absolute price, points, or pips before executing.
- Very specific: line 136
If the user asks only how to do something, provide commands and avoid running them.
- Very specific: line 138
If MT5 returns a non-success retcode, report the retcode, retcode_name, and comment.
- Distinctive: line 142
If Python hangs or does not print output, inspect the executable:
- Very specific: line 149
If MetaTrader5 cannot import, install it into the Python interpreter that will run interface.py.
- Distinctive: line 151
If MT5 cannot initialize, make sure the terminal is open or pass the full path:
- Very specific: line 157
If closing by --id fails because the ticket is not an open position, check pending orders with --cmd=orders.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Interface
Use this skill for the local MT5 Python CLI wrapper located at:
C:\Users\kecom\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Scripts\interface.py
The script is intended to operate MetaTrader 5 through the Python MetaTrader5 package. Treat it as a live-trading interface: do not submit market, pending, close, edit, or cancel commands unless the user explicitly asked for that action and the target account/symbol/ticket/volume/stops are clear.
Before Running
- Work from the script directory unless there is a reason not to:
cd C:\Users\kecom\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Scripts- Confirm a real Python executable is available. If
pythonresolves toC:\Users\kecom\AppData\Local\Microsoft\WindowsApps\python.exe, it may hang or open the Microsoft Store alias instead of running scripts. - Confirm the package is installed when execution is required:
python -m pip install MetaTrader5- Confirm MetaTrader 5 is installed, logged in, and allowed to trade. If needed, pass
--terminal,--login,--password, and--server. - For read-only inspection, prefer
--cmd=help,--cmd=opened,--cmd=orders,--cmd=history,--cmd=account, and--cmd=symbol.
Core Commands
Show the built-in help:
python interface.py --cmd=helpOpen a market buy using SL/TP distances in points:
python interface.py --cmd=open --type=buy --market=EURUSD --lot=0.10 --sl-points=200 --tp-points=400Open a pending buy limit using absolute SL/TP prices:
python interface.py --cmd=open --type=buylimit --market=EURUSD --lot=0.10 --price=1.08000 --SL=1.07500 --TP=1.09000Close one open position by ticket:
python interface.py --cmd=close --id=322334Close all positions, optionally filtered by market:
python interface.py --cmd=close --all --market=EURUSDEdit SL/TP on an open position or pending order:
python interface.py --cmd=edit --id=23232 --TP=1.09250
python interface.py --cmd=edit --id=23232 --sl-points=150 --tp-points=300Cancel a pending order:
python interface.py --cmd=cancel --id=998877List current positions:
python interface.py --cmd=opened
python interface.py --cmd=opened --market=EURUSDList pending orders:
python interface.py --cmd=orders
python interface.py --cmd=orders --market=EURUSDRead recent history. The misspelled alias hystory is accepted for compatibility:
python interface.py --cmd=history --last=10
python interface.py --cmd=hystory --last=10 --market=EURUSDCheck account or symbol details:
python interface.py --cmd=account
python interface.py --cmd=symbol --market=EURUSDParameter Rules
Use --SL and --TP for absolute prices only. Example: --SL=1.07500, not --SL=23 unless 23 is truly the broker price.
Use distance parameters when the user describes stops in points or pips:
--sl-points=200 --tp-points=400
--sl-pips=20 --tp-pips=40Use --price for pending order entry price. Market orders can omit --price; the script uses the current ask for buys and bid for sells.
Use --stoplimit for buystoplimit and sellstoplimit orders.
Use --lot or --volume for trade volume.
Use --deviation for allowed slippage in points on market entries and closes.
Use --filling when the broker rejects the default filling mode. Valid values are ioc, fok, return, and boc.
Use --json when another script needs machine-readable output. Use --dry-run to build and print an MT5 trade request without sending it to the broker.
Safety Workflow
Before sending live-trading commands, restate the exact operation in concrete terms: command, symbol, type, volume, price if pending, SL, TP, ticket if applicable, and whether values are absolute prices or distances.
If the user provides ambiguous stops like SL=23, ask whether they mean an absolute price, points, or pips before executing. Do not convert ambiguous stop values silently.
If the user asks only how to do something, provide commands and avoid running them. If testing an order workflow, use --dry-run first.
If MT5 returns a non-success retcode, report the retcode, retcode_name, and comment. Suggest the smallest relevant next check, such as symbol visibility, filling mode, invalid stops, market closed, insufficient margin, or wrong ticket type.
Common Troubleshooting
If Python hangs or does not print output, inspect the executable:
where.exe python
Get-Command python | Select-Object Source,CommandTypeIf MetaTrader5 cannot import, install it into the Python interpreter that will run interface.py.
If MT5 cannot initialize, make sure the terminal is open or pass the full path:
python interface.py --cmd=account --terminal "C:\Path\To\terminal64.exe"If closing by --id fails because the ticket is not an open position, check pending orders with --cmd=orders; pending orders are removed with --cmd=cancel.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

