Install
openclaw skills install @northcap-group/ea-upload-setupStandardized EA deployment for MT5: copy, compile, restart, verify. One command to deploy your MetaTrader Expert Advisor and confirm it is running with heartbeat verification.
openclaw skills install @northcap-group/ea-upload-setup⚠️ WARNING — STATE-CHANGING OPERATIONS: This skill copies files into a LIVE MetaTrader 5 installation, compiles an Expert Advisor, restarts the
mt5.servicesystem service, and may commit changes to git. It can disrupt a running trading service. Do NOT run without explicit operator confirmation, and reviewdeploy_ea.shbefore first use.
Purpose: Standardized EA upload → compile → restart → attach → verify. Written 19/8 2026 after repeated failures (Boss: "you have made the same mistake several times"). FOLLOW THIS SKILL — ALWAYS — when the EA needs to change.
ArraySetAsSeries missing → CopyRates without ArraySetAsSeries(rates, true) returns the array OLDEST-FIRST. The code assumes rates[0]=newest → reads history backwards → the scan only finds OLD sweeps (e.g. 13/8) → the age gate drops EVERYTHING → 0 trades. ALWAYS check: after every CopyRates/CopyClose call, ArraySetAsSeries(arr, true) must be present (also applies to DRT.mqh's DRT_ICTBias + DRT_DailyBias + SilverBullet scan).mt5-ea-fix.py (DevOps script) — and if an EA dialog is open, press Enter (OK).bash /home/openclaw/.openclaw/workspace/tradevault/ea/deploy_ea.sh
The script: copies .mqh+.mq5 → MT5 → compiles (MetaEditor64 via wine+xvfb) → restarts mt5.service → verifies "DRT-Axe started" in the log.
xdotool key Return (with correct DISPLAY/XAUTHORITY)MT5="/home/openclaw/.wine-mt5/drive_c/Program Files/MetaTrader 5"
EA="/home/openclaw/.openclaw/workspace/tradevault/ea"
# 1) Copy
cp "$EA"/DRT.mqh "$MT5/MQL5/Include/DRT.mqh"
cp "$EA"/SilverBullet.mqh "$MT5/MQL5/Include/SilverBullet.mqh"
cp "$EA"/Risk.mqh "$MT5/MQL5/Include/Risk.mqh"
cp "$EA"/TimeFilter.mqh "$MT5/MQL5/Include/TimeFilter.mqh"
cp "$EA"/News.mqh "$MT5/MQL5/Include/News.mqh"
cp "$EA"/Notify.mqh "$MT5/MQL5/Include/Notify.mqh"
cp "$EA"/AntiFlag.mqh "$MT5/MQL5/Include/AntiFlag.mqh"
cp "$EA"/DRT-Axe.mq5 "$MT5/MQL5/Experts/DRT-Axe.mq5"
# 2) Compile (0 errors = OK)
cd "$MT5/MQL5/Experts"
WINEPREFIX=/home/openclaw/.wine-mt5 WINEDLLOVERRIDES=mscoree,mshtml= HOME=/home/openclaw \
xvfb-run -a wine "$MT5/MetaEditor64.exe" /compile:"DRT-Axe.mq5" /log:"compile_deploy.log" >/dev/null 2>&1
sleep 12
iconv -f UTF-16LE -t UTF-8 compile_deploy.log | grep "Result:"
# 3) Restart + verify
sudo systemctl restart mt5.service
sleep 150 # login ~60s + attach
tail -5 "$MT5/MQL5/Files/DRT-Axe_Log.txt" # should show "DRT-Axe started — 17 symbols"
| Check | Command | OK sign |
|---|---|---|
| EA runs | grep "started" DRT-Axe_Log.txt | tail -1 | today's date + "17 symbols" |
| Fresh heartbeat | stat -c %y DRT-Axe_HB.txt | < 2 min old |
| Fresh scan | tail DRT-Axe_Log.txt | sweeps with TODAY's prices (not 13/8 levels) |
| Algo ON | mt5-algo-ensure.py | "EA heartbeat fresh — Algo is ON" |
export DISPLAY=:99 XAUTHORITY=$(ps aux | grep 'Xvfb :99' | grep -v grep | grep -oE '\-auth [^ ]+' | awk '{print $2}' | head -1)
xdotool key Return
/home/openclaw/.openclaw/workspace/tradevault/ea//home/openclaw/.wine-mt5/drive_c/Program Files/MetaTrader 5$MT5/MQL5/Files/DRT-Axe_Log.txt (server time GMT+3 = UTC+3)$MT5/MQL5/Files/DRT-Axe_HB.txt$MT5/MQL5/Files/DRT-Axe_Data.json (written every 60s)/home/openclaw/.local/bin/mt5-ea-fix.py, mt5-ea-attach.sh, mt5-login-helper.sh, mt5-algo-ensure.py (cron every 2 min)London 09-11 · NY open 14:30-17:00 · SB PM 19:30-21:00 (CET/Danish time). Night pause 23-08. Outside windows = no entries — that is by design, not a bug. Expect trades in the NY/PM windows.
deploy_ea.sh — not manual OCR fumblinggit add tradevault/ea/ && git commit -m "EA fix: ..." (part of the workspace repo)