Write an unambiguous specification first
A generator cannot resolve every trading ambiguity from a phrase such as “buy the breakout.” Specify what counts as a breakout, when it is confirmed, how a position exits, and what happens after a loss or an open order. Ambiguous requirements make comparisons subjective.
| Requirement | Example of a precise choice | Why it matters |
|---|---|---|
| Script type | An indicator with alerts, or a strategy with simulated orders | Plots and alerts alone do not define backtest trades. |
| Signal timing | Evaluate confirmed chart bars; identify any higher-timeframe input | Intrabar changes can differ from historical signals. |
| Entry event | A crossing event rather than every bar above a threshold | A persistent condition and a one-bar event produce different signals. |
| Position and exit | One position, fixed quantity, explicit exit condition | Unspecified sizing or reversals can dominate results. |
| Costs and data | Name symbol, timeframe, test dates, commission, and slippage | Different test settings prevent a fair comparison. |