JSON manifest format
A scenario can also be saved as a single JSON file — useful for sharing, version control, or batch creation.
When to use it
- You're sharing a strategy with someone else
- You want to keep history outside the database
- You're scripting batch creation of variations
For one-off tinkering, the New Scenario form is faster.
Top-level structure
{
"schema_version": "v1",
"name": "ema_trend_scalper",
"version": "1.0.0",
"description": "Simple EMA crossover, 30 pip TP / 50 pip SL",
"data": { ... },
"indicators": [ ... ],
"signals": { ... },
"execution": { ... },
"cost": { ... },
"volume": { ... },
"kill_switch": { ... },
"report": { "title": "EMA Trend Scalper" },
"chart": { "overlays": [ ... ] },
"initial_equity": 10000
}
Every section is described below. Fields marked (opt) are optional.
data
{
"csv_path": "data/EURUSD_M1.csv", // (opt on import — pick from server later)
"symbol": "EURUSD",
"timeframe": "M1", // M1 / M5 / M15 / M30 / H1 / H4 / D1
"pip_size": 0.0001, // 0.01 for JPY / metals, 0.0001 for FX
"contract_size": 100000 // 100 for XAU, 100000 for FX, etc.
}
indicators
An array. Each element has a kind and an id, plus kind-specific parameters.
[
{ "kind": "ema", "id": "ema_fast", "period": 10 },
{ "kind": "ema", "id": "ema_slow", "period": 30 },
{ "kind": "atr", "id": "atr_14", "period": 14 },
{ "kind": "supertrend", "id": "st_1", "period": 10, "multiplier": 3.0 },
{ "kind": "ut_bot", "id": "utbot_1", "atr_period": 10, "atr_multiplier": 1.0 }
]
See Indicators for the parameter reference.
signals
Either both buy and sell, or just one. See Signals for operator details.
{
"buy": { "op": "cross_above", "fast": "ema_fast", "slow": "ema_slow" },
"sell": { "op": "cross_below", "fast": "ema_fast", "slow": "ema_slow" }
}
execution
{
"tp_pips": 60,
"sl_pips": 30,
"same_candle_rule": "sl_first" // sl_first / tp_first / by_candle_direction / skip_trade
}
cost
{
"spread_mode": "from_csv", // from_csv / fixed / dynamic
"spread_pips": 2, // only used if spread_mode = "fixed"
"commission_per_lot": 7, // (opt)
"slippage_pips": 0.5 // (opt)
}
volume
Discriminated by mode.
// Fixed
{ "mode": "fixed", "lot": 0.1 }
// Linear-after-loss
{
"mode": "linear_after_loss",
"base_lot": 0.1,
"step": 0.05,
"max_lot": 1.0,
"reset_when": "breakeven_or_win"
}
kill_switch
All fields optional. Leave the whole object as {} to disable.
{
"max_daily_loss": 200,
"max_drawdown_percent": 15,
"max_loss_streak": 5,
"pause_after_loss_minutes": 30 // (opt) transient cooldown after each loss
}
chart
{
"overlays": [
{ "id": "ema_fast", "color": "#FF6B00", "width": 1 },
{ "id": "ema_slow", "color": "#0066FF", "width": 1 }
]
}
Only line indicators (EMA, SMA) can be drawn as overlays.
Tips for hand-editing JSON
- Use the template button in the New Scenario dialog —
Download templategives you a fully populated starter file. - Validate before importing — the import dialog reports per-field errors, but a JSON syntax error means the file won't even parse.
- Keep
schema_version— future format changes will use this for migrations. nameis just a label — the scenario ID (slug) is derived fromnameon import; you can override it in the form.
Schema versioning
The current schema is v1. When v2 ships, v1 manifests will continue to load via an automatic migration. You don't need to update old files.