> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quanorix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generator

> Mass random search, costs, workers, OOS, and live Databank flush.

# Generator

The **Generator** explores strategies at scale (random search by default), evaluates them on your history, and — if enabled — saves them to the **Databank**. Compute runs on your **TPA** (server worker only in special environments); for customer production, assume the TPA is **online**.

<Frame caption="Generator form. Click to zoom.">
  <img src="https://mintcdn.com/quanorix/2kJanlhXKp9-dfu0/images/es/generator-main-dark.png?fit=max&auto=format&n=2kJanlhXKp9-dfu0&q=85&s=579b0fefbe2f2f07f15b77e21b832488" alt="Strategy Generator page" width="1169" height="3234" data-path="images/es/generator-main-dark.png" />
</Frame>

<Warning>
  You need a symbol downloaded under [Market data](/en/data/market-data) and a [linked, online TPA](/en/tpa/install). Without data or an agent, the job will not start or enqueue will fail.
</Warning>

## Typical flow

1. Open **Generator**.
2. Pick a **symbol** (already downloaded) and date range (empty = full available history).
3. Set attempts (`n`), risk/costs, and **workers**.
4. Enable **Save to databank** if you want the run persisted.
5. Click **Generate** and follow progress on the page or in **Jobs**.

You can keep navigating — the job runs in the background.

## Data

| Field             | Role                                              |
| ----------------- | ------------------------------------------------- |
| Symbol            | Must exist in your downloaded datasets            |
| Entry timeframe   | Fixed or **Auto (randomize)** (D1 is never entry) |
| Higher timeframes | HTF context (max 2 TFs strictly above entry)      |
| From / To         | IS search window; empty = full coverage           |

Partial coverage or a missing symbol is called out in the UI with a link to Data.

## Engine (random search)

* **Attempts**: how many candidate strategies to explore.
* **Min trades / max leaves**: minimum viability and entry-rule complexity.
* Genetic evolution **from an already saved strategy** is done in Databank → **Evolve** (you do not need to invent GP from scratch here). See [Strategy detail](/en/databank/strategy-detail).

## Exit / order types

Opt-in by probability (0 = never):

* Break-even, time exit, reverse / opposite signal
* Pending Stop/Limit orders
* **Entry trigger edge** (false→true pulse) vs re-enter while the signal stays true
* **Force edge on multi-TF** when HTF leaves exist (better MT parity on sticky signals)
* **Max entries/day** (0 = no run-level cap)

These mechanisms export to MQL with backtest parity when applicable.

## Risk, costs, and validation

| Concept             | Notes                                                                |
| ------------------- | -------------------------------------------------------------------- |
| Capital / sizing    | Risk % (from stop) or notional % of balance                          |
| Compounding         | On = size on current balance; off = fixed initial capital            |
| Commission          | USD per lot round-trip                                               |
| Spread              | Points (MT Market Watch style) or bps                                |
| Slippage            | bps                                                                  |
| Session             | All / Asia / London / NY (entry filter)                              |
| OOS holdout         | Fraction 0–0.5 of history for retest; 0 = off. \~0.2–0.3 recommended |
| Top / sort / Pareto | How the top-K is chosen (PF, Net, etc. or Pareto front)              |

## Workers and memory (OOM)

**Workers** evaluate in parallel. Each extra worker copies data and caches in RAM. With long series (M1 / multi-TF), **2–4 workers can exhaust memory**.

* Start at **1**.
* Increase only if you have spare RAM and stable runs.
* If the job dies with OOM / process-pool errors, lower workers or shrink range/`n`.

## Saving and live Databank

* **Save to databank**: persists the run (not only temporary on-screen results).
* **Update databank every (seconds)**: incremental top-K flush while the job runs (min \~5 s; default \~60 s). A final reconciliation happens at completion.
* With TPA, mid-run flush also feeds the Databank when agent and job are set up for it.

During an active generation, the Databank may show a live job and refresh on its own.

## Reset and draft

* **Reset** restores generator defaults (does not change global Settings).
* The form draft is stored in the browser **per user**; switching accounts should not inherit another user’s draft.

## Presets and multi-TF

Saving/loading presets and timeframe randomization: [Presets and multi-timeframe](/en/generator/presets-mtf).

## Next

* [Databank](/en/databank/overview)
* [Export bots](/en/export/mt4-mt5)
* [Troubleshooting](/en/troubleshooting) — OOM, stuck jobs, TPA offline
