# cTrader cBot scaffold — project rules A Linux-native toolchain for building cTrader cBots in C# and compiling them to `.algo`, plus running/backtesting them headless via Spotware's official cTrader CLI Docker image. No Windows, no cTrader desktop app. See `README.md` and `docs/research-findings.md`. ## Domain facts (load-bearing, verified) - cBots are .NET 6 class libraries referencing the **official** NuGet package `cTrader.Automate` (owner **spotware**). Do **not** use the third-party `cAlgo.API` package — it is not the Spotware SDK. - `dotnet build` emits the `.algo`; the cTrader desktop app is not needed to compile. - `.algo` is a proprietary, encrypted container (file magic = ASCII `algo`), not a ZIP. - `cTrader.Automate` 1.0.17 names the `.algo` after the project's **parent folder** (no override property); `scripts/build.sh` renames artifacts to `.algo`. - Run/backtest on Linux requires cTrader 5.4+ console image (`ghcr.io/spotware/ctrader-console`). ## Conventions - Everything committed is **English** (code, comments, docs, commit messages). - New cBots go under `src//`, one class-library project each. ## Skills plugin: project facts - **Code roots:** `src/` (cBots/indicators), `scripts/` (toolchain). - **Build command:** `./scripts/build.sh` (wraps `dotnet build -c Release`, collects `dist/.algo`). Requires the .NET SDK on PATH or in `~/.dotnet` (`./scripts/install-dotnet.sh`). - **Test command:** none yet (no test project). Build success + a valid `.algo` (magic bytes `algo`) is the current acceptance check. - **Run/backtest:** `./scripts/run-console.sh` (Docker, official cTrader console). - **Issue tracker:** none yet.