Engine backtestify-engine-4 · Parser v10
A signal only counts once the candle that produced it has closed. The trade itself fills at the OPEN of the next candle, never on the signal candle's own close, which the strategy could not have traded on in real time.
When a stop and a target are both touched inside the same candle, the level nearer the candle's open is taken first, the same rule TradingView's tester applies, so the report and the exported script book the same exit. A candle that opens beyond a level fills at the open. Every such trade is counted and disclosed as ambiguous.
When a candle opens beyond the stop, the fill is the OPEN price, not the stop price, the strategy could not have gotten the stop price because the market never traded there. The same rule applies in the other direction: a candle that gaps straight through the target fills at the open, not the target. Fills never happen at a price the candle did not actually trade.
Every trade pays commission on both sides (entry and exit) at 0.05% per side, plus 0.02% slippage per side. These are the same defaults every simulation uses, see the "Execution assumptions" panel on any report for the figures actually applied to it.
Each trade is sized off account risk to the stop distance. Where a strategy has no stop, or the implied position would be larger than the account can actually hold, size is capped at 100% of account equity notional, a single trade never simulates more capital than the account has.
Candles are exchange spot data. When the primary data source cannot serve a symbol or window, Backtestify falls back to the next provider in a fixed order rather than inventing candles, a run that could not get real data reports a failure for that timeframe instead of a result.
Every indicator needs bars before it produces its first value. Backtestify fetches 3× the longest indicator period, floored at 50 bars and capped at 1000 bars, purely to warm indicators up. Those bars are never counted as tested history and no trade is taken on them.
History is split chronologically: the first 70% trains or selects the strategy, the remaining 30% is the unseen window, held back from the search. The winning spec is frozen and hashed BEFORE the unseen window is touched. That one frozen spec produces the verdict and is evaluated exactly once for that purpose. Afterwards, robustness and cost-stress diagnostics re-run the same frozen spec on the same candles, parameter neighbourhood, execution delay, extra slippage, doubled costs, and those extra evaluations are reported as diagnostics, never as the verdict.
A "create" or "improve" run also reports how many candidate specs were evaluated on the train window; it is always shown on the report's integrity receipt.
Two outcomes. RECOMMENDED needs every gate below on the numbers the report shows.
Never recommended: a run that lost money, rules we could not execute as written, no exit rule, or a named strategy whose published rules we could not find.
Below these trade counts a recommendation carries a “limited sample” tag:
Unseen-window trades needed before its edge is scored:
Real house-run reports, published with their full integrity receipt visible to signed-out visitors, including strategies that failed.