Best for
- Deploying or restarting tick collection on bigblack
- Diagnosing tick gaps or missing data
- Troubleshooting Wine or MT5 issues
terrylica/cc-skills/plugins/mql5/skills/tick-collection-ops/SKILL.md
Operate and troubleshoot the MT5 tick collection system. HOST MOVED 2026-08-07 - MT5 now runs on the FXView VPS (Windows scheduled tasks, C:\odb-tickrings), NOT bigblack/Linux-Wine/systemd. EA, ring format and gap-detection reasoning unchanged. Covers gap detection, restart recovery, daily ops.
Decision brief
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/terrylica/cc-skills --skill "plugins/mql5/skills/tick-collection-ops"Inspect the Agent Skill "tick-collection-ops" from https://github.com/terrylica/cc-skills/blob/05f53c5b24a445c1895e9b0590212e66cd70f39e/plugins/mql5/skills/tick-collection-ops/SKILL.md at commit 05f53c5b24a445c1895e9b0590212e66cd70f39e. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Deploying or restarting tick collection on bigblack
TickCollector EA runs on MT5 via Wine on headless Linux (bigblack)
Review the “Production Topology” section in the pinned source before continuing.
All are user-level systemd units. MT5 depends on the display stack. The chain must start in order -- xvfb first, mt5 last.
New Parquet file created each trading day
Permission review
The documentation asks the agent to read local files, directories, or repositories.
EA detects day change and calls `tw_close` (finalize current file) + `tw_init` (open new file)The documentation asks the agent to read local files, directories, or repositories.
**Wine cannot follow symlinks** for file access -- use physical file copies for EA and DLL deploymentEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 93/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 61 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
⚠️ HOST SUPERSEDED — 2026-08-07
MetaTrader 5 no longer runs on bigblack. It runs exclusively on the FXView broker VPS (Tailscale host
fxview-mt5,100.126.202.32, Windows), on demo account 400364. The Mac-local Wine bench was deleted 2026-08-06; bigblack's Wine terminal + itsxvfb/xfce/x11vncdesktop andfxview-sidecarare being decommissioned.On the VPS the topology is Windows scheduled tasks, not Linux systemd:
Concern bigblack (retired) FXView VPS (current) Terminal mt5.serviceunder Wine,DISPLAY=:99terminal64.exe, native Windows, real sessionTick rings /dev/shm/tick_ring_<SYM>C:\odb-tickrings\tick_ring_<SYM>Ring → bus — odb-tapegateway.exe→ taskOdbTickRingToNatsTapeGatewayBus — nats-server.exe:4222→ taskOdbTapeBusNatsJetStreamServerOrders — order-service :50060→ taskODB-MT5-OrderServiceSymbols EUR/GBP/XAU/XAG EUR/GBP/XAU only (silver excluded per directive 2026-05-26) Service control systemctlGet-ScheduledTask/Start-ScheduledTaskReach it with
ssh fxview-mt5. PowerShell over SSH eats$_under shell quoting — pass commands base64-encoded viapowershell -NoProfile -EncodedCommand <base64-utf16le>.Everything below still describes the Linux/Wine deployment. It is retained because the EA, the
tick_writer.dllring format and the gap-detection reasoning are unchanged and still authoritative — only the HOST and the service manager moved. Do not use it to stand up a new Linux MT5.Canonical:
opendeviationbar-patterns/docs/adr/2026-08-07-retire-bigblack-as-a-metatrader-host-…mdanddocs/decision-register-metatrader-hosting-and-market-data-source-provenance.md.
Operate, monitor, and troubleshoot the zero-gap tick collection system running on Linux via Wine.
Use this skill when:
TickCollector EA (MQL5) --> tick_writer.dll (Rust) --> Parquet files
OnTick() callback C-ABI FFI ZSTD compressed
CopyTicksRange() Buffered writes One file per day
Watermark dedup Row group flush
| Resource | Path |
|---|---|
| Git repo | ~/eon/mql5/ |
| Wine prefix | ~/.mt5/ |
| MT5 install | ~/.mt5/drive_c/Program Files/MetaTrader 5/ |
| EA source | {repo}/mql5_ea/TickCollector.mq5 |
| DLL (Windows) | {mt5}/MQL5/Libraries/tick_writer.dll |
| Tick data | {mt5}/tick_data/ (symlinked to ODB cache) |
| Systemd units | systemd user units: xvfb, xfce, x11vnc, mt5 |
xvfb (virtual framebuffer)
--> xfce (desktop environment)
--> x11vnc (VNC access)
--> mt5 (MetaTrader 5 via Wine)
All are user-level systemd units. MT5 depends on the display stack. The chain must start in order -- xvfb first, mt5 last.
{SYMBOL}_{YYYYMMDD}.parquettw_close (finalize current file) + tw_init (open new file)On EA restart:
tw_get_last_time_msc to read resume watermark from the last Parquet file footer_1, _2 suffix (not overwrite)CopyTicksRange from the watermarkThe Rust DLL renames corrupt/incomplete files to _partial suffix rather than attempting recovery.
Use DuckDB to check for gaps between consecutive ticks:
WITH ticks AS (
SELECT time_msc,
lead(time_msc) OVER (ORDER BY time_msc) - time_msc AS gap_ms
FROM read_parquet('{base_path}/FXVIEW_{SYMBOL}/{YYYY}/{SYMBOL}_{YYYYMMDD}.parquet')
)
SELECT time_msc, gap_ms,
make_timestamp(time_msc * 1000) AS ts
FROM ticks
WHERE gap_ms > 60000 -- gaps > 1 minute
ORDER BY gap_ms DESC;
Interpreting results:
These are CRITICAL anti-patterns -- violations cause silent crashes or data loss:
%I64u or %I64d format specifiers in MQL5 -- crashes Wine silently. Use IntegerToString() instead.iconv -f UTF-16LE -t UTF-8 to read itDISPLAY=:99 must be set (Xvfb virtual display number)Use /mql5:mql5-ship slash command for full deployment:
--ea-only for EA source changes--dll-only for Rust DLL changesDetailed deployment steps (SSH commands, file copies, compilation) are in the headless-mt5-remote local skill. Not duplicated here to avoid drift.
systemctl --user status mt5
ls -la ~/.cache/opendeviationbar/ticks/FXVIEW_EURUSD/$(date +%Y)/
duckdb -c "SELECT count(*) FROM read_parquet('path/to/file.parquet')"
ls ~/.cache/opendeviationbar/ticks/FXVIEW_EURUSD/$(date +%Y)/*_[0-9].parquet 2>/dev/null
systemctl --user list-units --type=service | grep -E "xvfb|xfce|x11vnc|mt5"
journalctl --user -u mt5 --since "1 hour ago" --no-pager
headless-mt5-remote local skill: Deployment steps (SSH, file copy, compilation)fxview-parquet-consumer skill: Data consumption patterns (schema, DuckDB queries)| Issue | Cause | Solution |
|---|---|---|
| MT5 service won't start | Display stack not running | Start xvfb first, then xfce, x11vnc, mt5 |
| EA not collecting ticks | Symbol not in Market Watch | Open chart for symbol in MT5, re-attach EA |
| Wine crash on PrintFormat | Using %I64u/%I64d specifiers | Replace with IntegerToString() |
| DLL load failure | Missing tick_writer.dll | Copy DLL to MQL5/Libraries/ (physical copy) |
| Gaps in tick data | EA restart or network issue | Check journalctl, verify recovery segments exist |
| Recovery file _1_2 | Normal after restart | All segments are valid, union in DuckDB |
| Compile log unreadable | UTF-16LE encoding | Use iconv -f UTF-16LE -t UTF-8 |
| Xvfb not running | Service crashed or not enabled | systemctl --user start xvfb |
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
Frequently asked questions
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
The source record exposes this install command: npx skills add https://github.com/terrylica/cc-skills --skill "plugins/mql5/skills/tick-collection-ops". Inspect the command and pinned source before running it.
Static rules flagged read-files in the source; the page lists the matching lines and excerpts.
Alternatives
Postpartum-genushyacinthus29/dotnet-skills
Build long-running .NET background services with `BackgroundService`, Generic Host, graceful shutdown, configuration, logging, and deployment patterns suited to workers and daemons.
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
garrytan/gbrain
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary. Strips YAML frontmatter, sanitizes emoji, applies running headers and page numbers. Brain page is always the source of truth; PDF is a rendering.
NVIDIA/skills
How to swap the DeepStream CV detection model in the VSS Alerts Blueprint verification (2d_cv) mode - covers ONNX export, custom bbox parsers, compose mount gotchas, nvinfer config, runtime TRT engine build, deployment, and a segmentation-capable model addendum handoff.