export-healthcheck.sh inspects the ctrader-export systemd service result and today's
export log, then sends a one-line Telegram summary via notify.sh. Intended to run a few
hours after the 03:30 timer (e.g. a one-shot `systemd-run --user` timer) to confirm the
overnight export actually ran.
This host has no cron daemon (it is systemd-based), so schedule export-runner.sh via a
systemd timer rather than cron. cron-export.sh wraps the run with a sane PATH, flock
serialisation (no overlapping runs), and per-run logs under runtime/logs/. The timer is
Persistent, so a 03:30 run missed because the machine was asleep/off is caught up on the
next boot -- which plain cron does not do.
- scripts/cron-export.sh: scheduled-run wrapper.
- deploy/systemd/ctrader-export.{service,timer}: the units (install: sudo cp into
/etc/systemd/system/ then enable -- see deploy/systemd/README.md).
The first full production run aborted on Copper 2017-04: a month with no data
*inside* the symbol's range. cTrader does not emit the clean "No historical data"
message for an in-range hole; it runs the backtest to its `}` summary but with a
degenerate empty result and no EXPORT_SUCCESS. run_one misread that as a transient
failure and hard-aborted after retries.
Reaching the `}` summary means the backtest completed cleanly, so the absence of an
export marker is an empty month (rc 3, skipped), not a transient failure. A genuine
transient failure never reaches `}`, which is what distinguishes the two.
MS_SimpleExport is a market-data exporter (M1/Tick -> zipped binary), driven
headless via the official cTrader-console Docker image. This adds the bot and a
hardened bash driver that runs the scrape on a Linux host, spawning one ephemeral
console container per backtest window.
- src/MS_SimpleExport: the cBot; csproj aligned to the repo's Linux template
(AlgoPublish=false, cTrader.Automate 1.*-*).
- scripts/export-runner.sh: hardened port of the Unraid driver -- retry-then-abort
on transient failure, gap-aware resume, current-month end-date clamp, 3-way run
classification with a per-run timeout, and ZIP validation before rename.
- scripts/export.env.example: deployment config template (real values live in the
gitignored runtime/export.env).
- docs/export-runner-quirks.md: the multi-lens audit findings and hardening decisions.
- .gitignore: ignore runtime/ (secrets, the placed .algo, the symbol list).
Build cBots in C# and compile them to .algo entirely on Linux via the
official cTrader.Automate NuGet package + 'dotnet build' — no Windows and
no cTrader desktop app. Run/backtest headless through Spotware's official
cTrader console Docker image.
Includes:
- src/SampleCBot: example SMA-crossover cBot (SDK-style net6.0 class library)
- scripts/install-dotnet.sh: root-free local .NET SDK install (~/.dotnet)
- scripts/build.sh: dotnet build -> dist/<ProjectName>.algo, with a workaround
for cTrader.Automate naming the .algo after the project's parent folder
- scripts/run-console.sh: wrapper over ghcr.io/spotware/ctrader-console
- docs/research-findings.md: sourced research; .algo verified as a proprietary
'algo'-magic container (not a ZIP); build verified end to end on Linux