Write a trading-system data-availability contract
Define what each feature could know at decision time before running the backtest.
Make competing exit conditions and timestamp boundaries deterministic.
Educational research design and invented arithmetic examples. No strategy returns, broker execution or production certification are supplied.
Declare trigger source, order priority, maximum hold and treatment of unavailable quotes. A later favourable price cannot repair a missed earlier stop. Preserve the native policy when comparing candidates.
State priority when a stop, target, maximum hold and administrative close could all act. Save the actual trigger observation and intended order time. When the data cannot determine sequence, use the declared ambiguity policy instead of choosing the favourable path separately for each trade.
Changing an exit changes the experiment even if entries remain identical. Keep the entry population and policy versions distinct so a later result cannot silently rewrite the original candidate. A different policy needs its own explicit evaluation, not a relabelled historical record.
Describe the cause, expected effect and observable alternative explanation. Decide which experiments can reject the idea before searching for parameters. Record every material research choice, including unsuccessful runs; the best final curve is not the whole research population.
Educational research design and invented arithmetic examples. No strategy returns, broker execution or production certification are supplied.
Define what each feature could know at decision time before running the backtest.
Keep selection decisions, rejected candidates and untouched evaluation periods auditable.
Design idempotency, partial fills, stale signals and restart reconciliation before live execution.
Its long entry fills at the next synthetic open. The entry-fill bar counts as completed holding bar one; after the third completed bar, the rule requests a whole exit for the next open. Automatic final liquidation is disabled, and buffer bars allow the last eligible position to close. There is no stop manager, daily profit floor or alternative exit contest in this specimen. A real policy can have other mechanisms but requires its own predeclared contract. This tutorial does not alter native VR minute exits or use an older daily-manager receipt as a baseline.
An intention at bar 7 fills at bar 8 open. Bars 8, 9 and 10 complete under the holding clock, so the close request occurs at bar 10 and fills at bar 11 open. The source and exported ledger agree on those IDs. Actual queue position, partial fill and liquidity are absent because this is library simulation over invented bars. A coded condition is useful evidence of deterministic behaviour, not a promise of an achievable price or a certified account response. Keep policy identity and actual transaction evidence separate.