Generator

The Generator searches one market for strategies and keeps the best one it finds. It composes strategies from the frame the Generator Template page defines, backtests each one, keeps the candidates that pass your validation criteria and writes them to that market's Collection.

The page has a toolbar across the top, a tabbed panel on the left and the live output on the right:

AreaWhat it holds
ToolbarStart / Stop, Clear, Reset and the progress strip
Left panelThe four tabs: Parameters, Settings, Validation and Statistics
Right panelTarget collection, then one Best strategy card with chart and statistics

The Generator owns its market. Changing the market in the Strategy Editor never changes it here, and changing it here never changes the Editor.

A run captures its settings

While a run is queued or running, the page presents the copy of the configuration that run captured when it started: the run settings, the validation criteria and the strategy template outline all describe the running search, not the next one.

Anything you change meanwhile — a template edit on the Generator Template page, a template or profile import — is saved and applies to the next run. It never rewrites what the page says the running search uses. When the run ends, the page returns to the saved next-run configuration.

Toolbar

ButtonWhat it does
Start / StopStarts a search, and stops the one running.
ClearDrops this market's displayed run statistics at once. The best strategy, the Collection records and the configuration are kept.
ResetRestores the run settings and search tuning and drops the displayed run statistics. The best strategy, template, criteria and Collection are kept.

While a run is active, the strip between the buttons reports elapsed time against the captured budget, time left, calculated count and passed-validation count. Ctrl+Enter is the keyboard equivalent of Start/Stop.

Clear returns the run statistics to their empty state: the Generator, Collection and Diagnostics tables say no run has been made for this market, and the Target collection card shows a dash per outcome counter. The Best strategy card keeps the last accepted strategy and its statistics and chart — a strategy is run output, not a run statistic. It is disabled while a run is active and when there are no run statistics to clear.

Reset restores Search best to net profit, Out of sample % to 0, Working time to 3 minutes, Thread limit to 2, Search balance to Balanced and Restart after to 500, and drops the displayed run statistics with it. It keeps the best strategy, the template, indicator pools, validation criteria and Collection records. It is disabled while a Generator run is queued or running, and while the stored configuration is locked.

Every one of the four actions clears the run statistics — Clear, Reset, Revalidate and Empty collection. They describe the last run's ingestion and are stale as soon as one of those actions changes what the Collection holds, so the page returns them to the empty state instead of showing numbers that no longer match. Empty collection is the only one that also drops the best strategy: it empties the collection that strategy belongs to, so the Best strategy card has nothing left to show — no collection, no strategy. Its undo strip puts the strategy back with the records.

The blocker line

Above the page content there is one line that is usually invisible. It appears only when a run cannot start — no loaded market data for the selected market, or a configuration error that blocks Start — or when a run failed, and then it names the cause. A ready, searching, stopped or finished run shows nothing there: the progress strip reports a live run and the Statistics tab reports a finished one, so the page has no status sentence to repeat. The same sentence is always readable as page state (summary).

Parameters

The Parameters tab holds one run settings card, grouped under the divider labels Market, Objective, Run and Template.

Market

Choose the server, the symbol and the period. The line under the three selectors reports the loaded history: bar count and period.

The Generator keeps this market for itself: changing the market in the Strategy Editor never changes it here, and changing it here never changes the Editor. While a run is queued or running the three selectors are locked, together with every other run setting, because the run keeps the settings it was started with.

Objective

  • Search best is the statistic the search climbs: net profit, net balance, return to drawdown, profit factor and so on. Higher is better, except for max stagnation, where lower is better. The default is net profit.
  • Out of sample % reserves the tail of the history for validation: 0 uses the whole period, and any value from 1 to 90 splits it. With a split, the search fits the in-sample window, and the whole and out-of-sample figures are reported. The default is 0.

Run

Working time (minutes) is the time budget of one run; the default is 3. The run ends when the budget is spent or when you press Stop.

The Thread limit that governs how many searches run in parallel lives on the Settings tab, in its Threads group.

Generator template, in the Template group, names the template the next run searches inside:

  • Current template — the first option, and the one the page starts on — means the working template of the Generator Template page, saved or not. Change the frame or the indicator pools there and start a run here; nothing has to be saved first. This option stays available even when that template happens to equal one of the presets.
  • Your templates lists the named templates of your account. The group appears only when the account has some; signing out hides it, the built-ins need no account, and so does a list that could not be read (the page state reports which of the three it was, generator-template-saved-status).
  • Built-in templates lists Default template, Conservative and Grid Demo.

Choosing a profile loads it into the working template, exactly as the same load on the Generator Template page would: it applies at once, so a half-typed value on the page is dropped rather than kept, and it is not an undo step there (the Template page recognises the loaded bytes on its next visit). The select names a profile only for as long as the working template is still the bytes that profile loaded: a frame or pool edit anywhere writes it back to Current template, which is the honest answer.

The select belongs to the run settings, so it is disabled while a run is queued or running, and while the stored configuration is locked.

Strategy template outline

Inside the run-settings card and below the Template divider, the outline is a read-only preview of the frame the run on screen searches inside — the frame it captured at Start while a run is active, otherwise the frame the next run will use. It starts collapsed as a five-row short list — Strategy features, Entry point, Entry rules, Exit point and Exit rules — and the Expand template chevron (which reads Collapse template while the details are open) reveals the full preview: the strategy features, then the entry point, the entry rules, the exit point and the exit rules, naming for each rule slot whether its generated rules vary, keep the model values or are pinned to a preset. The Generator Template page edits it.

Settings

The Settings tab holds the engine's search coefficients, the search balance and the Thread limit. They are configuration: every change is saved, applies to the next run, and a run captures the values it started with. Every control is disabled while a run is queued or running and while the stored configuration is locked; visible hints supplement the tooltips. The toolbar Reset restores every value on this tab to its default along with the Parameters settings.

Search tuning

The engine's own coefficients, all at their shipped values:

  • Search balance is how much of the run explores new frames instead of mutating the strategy it is currently climbing from: Explore draws 70 % of the candidates fresh, Balanced 35 % and Exploit 10 %. More exploring widens the search; more exploiting deepens it.
  • Restart after is the number of calculations without a new best before the search restarts, from a mutated elite or a fresh frame. The default is 500; a lower value explores more, a higher one climbs longer from the same start.

A value outside its range is an error that blocks Start; a half-typed value blocks it too, like any other number on the page. Restart after steps in 10s: a number between two steps is refused with the same message that names the grid, and saving a value from elsewhere snaps it onto the grid.

Threads

Thread limit is an upper limit on parallel searches, not a guaranteed number of threads or reserved CPU cores. The default is 2, and the selector offers 1 to 4. Each search normally runs in a separate browser Web Worker with its own random stream and the full working-time budget; their results are merged. The info icon beside the control explains the limits in a tooltip.

The shared worker pool uses the device's reported logical CPU count minus one, with a minimum of one and a maximum of four workers (two if the CPU count is unknown). Memory can lower the planned search count further. Previously saved limits above four display as 4 and remain compatible. Other background jobs may reduce how many searches run at once. If workers are unavailable or fail to start, the engine falls back to the main thread without parallel execution.

The hard search filters — a minimum count of trades and a minimum net profit — have no control: they stay at their engine defaults (1 trade, 0) and act only as a safety net behind the Validation tab's criteria.

Validation

The Validation tab holds three criteria editors: Full data, In sample and Out of sample.

  • A criterion is a threshold on one backtest statistic (minimum net profit, minimum profit factor, maximum drawdown and so on). Add criteria opens the menu of statistics; choosing one appends a criterion row, and a statistic can have only one row. The × removes a row, and Reset criteria restores only that window's defaults.
  • Full data starts with the EA Studio defaults — Minimum net profit 10 and Minimum count of trades 100, which is also what its reset restores. In sample and Out of sample start with their preset, Minimum net profit 0, and their reset restores that same row.
  • A candidate is accepted — it may become the best strategy and be written to the Collection — only when it passes every criterion of every applicable window. The search itself only needs the fixed hard filters, so a candidate that fails a criterion can still lead to one that passes.
  • The in-sample and out-of-sample criteria apply only when Out of sample % is above 0. At 0 both windows stay editable, and the note above them says they are inactive for the run.
  • A window with no criteria validates nothing, so clearing every window accepts every candidate that passes the hard filters.
  • The criteria are part of the Generator configuration: every change is saved, applies to the next run and is captured by a run when it starts. A half-typed threshold blocks Start.

The Generator Acceptance Criteria page describes the windows in the same terms.

Statistics

Before a run, the Statistics tab shows one empty-state line in place of the Generator and Diagnostics tables. Collection statistics stay visible. Once a run starts, the three tables carry the values of that run; a restored terminal run uses its captured counters.

Generator statistics

What the search itself produced: Attempted, Calculated, Accepted, Calculation rate, Improvements and Emitted for collection. Every counter names itself in the first column and explains on hover what it counts.

Collection statistics

What the last run did to this market's Collection: Count (the strategies it stores right now, out of the capacity every collection shares), Pushed (the records the run wrote, added plus replaced), Added, Replaced, Duplicates (candidates the Collection already had), Rejected, Pruned, Correlated, Retained (the size the run's last applied batch left) and Persisted (whether the browser accepted the last Collection write). The counters explain themselves on hover.

The run's counters are its own events, so they are not the Collection's live state: Count follows any change made on the Collection page, while Pushed, Duplicates and the other counters keep naming what this run did. Persisted covers the whole Collection storage, because the browser is written in one go. When a collection outgrows the browser's storage budget nothing is saved at all and the page says so in its warning line, so a run's strategies then live in memory only until the collection is trimmed or exported.

The capacity and correlation settings themselves stay on the Collection page.

Diagnostics

What the search dropped and how the run ended: invalid compositions, insufficient warm-up, no trades, unrankable candidates, not validated candidates, how many candidates each criterion rejected, restarts and the outcome. The table carries no header row, and it has no duplicates counter: the Collection statistics report the Collection's own duplicates.

Output

Best strategy

The card shows a strategy that passed the acceptance criteria. Its top row carries the strategy's magic number on the left and Open in Editor on the right; that button opens the best strategy in the Editor, moves the Editor to the Generator market and also saves the strategy to that market's Collection. Below the row comes the same balance/equity chart used for Collection records: balance and equity lines, shaded equity, account-currency labels and the out-of-sample split marker. It reuses the published record's sampled curves without extra backtesting and skips redraws on progress-only updates. Under the chart, the card places the configured Backtest statistics in a compact label/value table. With no candidate to show — not started, or cleared — the statistics are dashes and the chart keeps its axes and a flat initial-balance line.

The latest best strategy and a compact terminal run summary are saved per market in this browser. After a reload the result carries a Last run line with its date and time, captured template, working-time budget and calculation count, and Statistics is restored from the same captured run. Current controls still describe the next run. If an old best-only entry has no summary, the card explicitly says that run counters are unavailable. Clear and Reset drop the stored run summary and keep the best strategy. The run's seed, market, calculation, rule counts, acceptance and validation verdict remain in page state (generator-best-summary, generator-best-validated), as does its magic number (generator-best-magic-number).

Where the generated strategies go

Every accepted candidate — one that passed the hard filters and the validation criteria — is written to the market's Collection as the run goes.

The run creates that collection when it does not exist yet, and claims it as the active collection once, on the first batch it writes, so the Collection page and the Coll side panel show it from then on. A later batch never rewrites that selection: switching to another collection during a run stays switched. Open in Editor claims the collection it saves to as well.

Opening this page already points the Coll side panel at the Generator market's collection, and changing the market follows it at once. The panel shows the market you are searching even when the collection does not exist yet — a zero count and the note There are no strategies in this collection. followed by Run the Generator to create new strategies. — without creating it.

The Collection then decides what it keeps: its records filters, capacity and correlation rules apply there, on the Collection page.

Common problems

SymptomCause
Start is disabled and names a reasonThe run settings have an error or a half-typed number, or the market has no loaded data. Fix the named setting, or pick another market or Data Horizon
The page shows settings you did not saveA run is queued or running: the page presents the copy that run captured at Start. Press Stop to edit for the next run
The run ends at once with "Fixed template: one candidate evaluated"The template has no free parameter left to search. Open a probability, a range or a pool on the Generator Template page
Persisted reads false and the warning line mentions the browserThe Collection outgrew this browser's storage and nothing was saved. Trim or export the collection, then run again
The Validation tab says the in-sample or out-of-sample criteria are inactiveOut of sample % is 0, so those windows have no data to check. Set a split, or remove those criteria
A saved template is missing from Generator templateThe select lists only what the account could read: the page state says whether the account has none, the list failed to load, or the session is signed out
The best strategy is gone after a reloadThe browser cleared its storage, or another market is selected. A run writes it again