Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Coding
EA Upload Setup
Try itStandardized EA deployment for MT5: copy, compile, restart, verify. One command to deploy your MetaTrader Expert Advisor and confirm it is running with heartbeat verification.
What it does
EA Upload & Setup (DRT-Axe on MT5/Vantage) ๐ช
The skill document
EA Upload & Setup (DRT-Axe on MT5/Vantage) ๐ช
โ ๏ธ 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.
๐จ The 3 mistakes we HAVE made (learn from them!)
ArraySetAsSeriesmissing โ CopyRates withoutArraySetAsSeries(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).- OCR fumbling instead of DevOps scripts โ NEVER use xdotool/OCR to find the Algo button manually. Run
mt5-ea-fix.py(DevOps script) โ and if an EA dialog is open, pressEnter(OK). - Tokens wasted on code review โ the change is typically 1-4 lines. Fix โ run deploy โ verify. Do NOT read the whole code first.
โก Standard procedure (1 command)
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.
- โ SUCCESS = "EA RUNNING" + fresh heartbeat
- โ ๏ธ "not confirmed after 5 min" = a dialog is waiting โ
xdotool key Return(with correct DISPLAY/XAUTHORITY) - โ compile error = fix the code, run again
๐ ๏ธ Manual chain (if deploy fails)
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"
๐ Verification (ALWAYS after deploy)
| 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" |
๐ช If a dialog is waiting (EA properties)
- Symptom: EA loaded but "started" missing / HB frozen
- Fix: find DISPLAY+XAUTHORITY, press Enter:
export DISPLAY=:99 XAUTHORITY=$(ps aux | grep 'Xvfb :99' | grep -v grep | grep -oE '\-auth [^ ]+' | awk '{print $2}' | head -1)
xdotool key Return
๐ Fixed paths
- EA code (edit ONLY here):
/home/openclaw/.openclaw/workspace/tradevault/ea/ - MT5 folder:
/home/openclaw/.wine-mt5/drive_c/Program Files/MetaTrader 5 - EA log:
$MT5/MQL5/Files/DRT-Axe_Log.txt(server time GMT+3 = UTC+3) - Heartbeat:
$MT5/MQL5/Files/DRT-Axe_HB.txt - Data for the bot:
$MT5/MQL5/Files/DRT-Axe_Data.json(written every 60s) - DevOps scripts:
/home/openclaw/.local/bin/mt5-ea-fix.py,mt5-ea-attach.sh,mt5-login-helper.sh,mt5-algo-ensure.py(cron every 2 min)
โฐ Trading windows (entries)
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.
๐ Rules for EA changes (Boss 19/8)
- Make the CHANGE (typically a few lines) โ do not read the whole code
- Run
deploy_ea.shโ not manual OCR fumbling - Verify with the table above
- Commit:
git add tradevault/ea/ && git commit -m "EA fix: ..."(part of the workspace repo) - Report briefly: what was changed + proof that it is running
Related skills
Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
Save, search, and manage personal notes and knowledge bases in Get็ฌ่ฎฐ on explicit request.
Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
More from northcap-group
Browse all skillsDealing Range Theory (DRT) โ complete ICT structure: Type 1 (continuation), Type 2 (reversal), Type 3 (consolidation), quadrant levels (25/50/75), entry models, SMT confirmation and news filter. For market analysis and trade setups.
Crypto DRT scalping strategy + backtest reference on 12 crypto pairs (TRX, BNB, BTC, LINK, AVAX, DOGE, SOL, NEAR, XRP, LDO, ADA, ETH), all 7 days. Backtested 2 years (~400+ trades). 100% lokal backtest-reference โ ingen netvรฆrkskald, ingen API-nรธgle. Backtest results are historical and not a guarantee of future performance.
Provides pay-per-call crypto trading signals with entry, stop-loss and take-profit via the x402 standard (USDC on Ethereum). Live DRT/ICT signals for agents and traders.
How the world's best entrepreneurs network, negotiate, and create partnerships. Relationships that build millions.
Crypto DRT scalping โ Dealing Range Theory on 12 crypto pairs (TRX, BNB, BTC, LINK, AVAX, DOGE, SOL, NEAR, XRP, LDO, ADA, ETH), all 7 days. Backtested 2 years (~400+ trades). Backtest results are historical and not a guarantee of future performance. Separate play-money account rules.
How to build wealth from zero โ bootstrapping, scaling strategies, resource allocation, and wealth mindset. Strategic advisory for Mohamed.