The minimum specification
Two people should be able to read the same historical observations and identify the same candidates without seeing future bars. Labels such as strong trend, clean rejection and institutional buying do not meet that requirement on their own.
| Field | Decision to write down | Why it changes the result |
|---|
| Inputs | Symbol universe, feed, interval, session and adjustment policy | Different bars or survivorship choices produce different candidates |
| Eligibility | Exact price, indicator or calendar conditions | A pattern name can hide many incompatible definitions |
| Trigger and timing | Completed-bar condition or intrabar event; when an order is submitted | A signal price is not necessarily an available execution price |
| Cancellation | Expiry, invalidation, data failure and existing-position rules | Unfilled candidates otherwise disappear from the record |
| Position and exits | Quantity, stop, target, time exit, costs and exposure limits | The same entry can produce different return distributions |
An invented breakout specification
This example defines mechanics rather than recommending a trade. Use standard daily bars from a named feed. For each completed bar, set the reference level to the highest high of the preceding 20 completed bars, excluding the current bar. A candidate occurs when the current close is strictly above that level and no position is open.
- At that close, record the prior 20-bar level, the signal bar low and the signal timestamp. Missing history means no candidate.
- Model an entry at the next session open. This price is not known when the signal is created; the example only enters if that open is above the frozen signal low.
- Use that low as the stop reference. Set an illustrative target at twice the distance from the actual entry fill to the reference; exit at the close of the tenth holding session if neither price exit has occurred.
- For a reproducible research comparison, use a fixed small quantity subject to available cash. Any risk-based size model must state how it handles an unknown next-open fill.
- Declare how to treat a bar that reaches both exit levels. OHLC alone may not determine their order. Use verified finer data or a predefined conservative assumption and label it.
Pattern names do not identify a cause
Breakout, pullback, range re-entry and divergence describe different observable arrangements. They do not by themselves show why a participant traded or whether the pattern has positive expectancy.
| Pattern family | A detail that must be specified | An unsupported leap to avoid |
|---|
| Breakout and retest | How the level is built and how long a retest remains eligible | Every broken resistance level becomes effective support |
| Moving-average pullback | Touch, close below, recovery crossing, and average settings | Touching a moving average proves buying pressure |
| Failed breakout | Threshold beyond the range and deadline for return inside | A chart proves someone deliberately trapped retail traders |
| Divergence | Which pivots are matched and when they are confirmed | A mismatch guarantees momentum exhaustion or reversal |
A positive backtest average needs more than a trade count
Suppose 100 invented trades contain 40 wins averaging 2R and 60 losses averaging 1R. Gross expectancy is (40 × 2 − 60 × 1) / 100 = 0.20R per trade. If each trade costs 0.25R, net expectancy is −0.05R. The target ratio alone would have missed the negative result.
- Use realized average wins and losses, including partial exits and gaps, rather than substituting the planned target and stop. Define R consistently.
- No universal 50- or 100-trade threshold proves reliability. Dependence between trades, regime concentration and the number of tried variants all affect uncertainty.
- Report the evaluation dates, candidate count, fills, costs, drawdown and exposure. Include skipped candidates and the reasons.
- Choose parameters on development data, then evaluate on untouched observations. Selecting the best historical variant and increasing its size can amplify selection error.
What to record after execution
Save the setup version, observations at decision time, submitted order, actual fill and exit. Separate rule violations from trades that followed the rule and lost. A stop boundary is a chosen exit instruction, not a mathematical proof that a market thesis has become false.
- Compare planned and actual price risk. A stop trigger does not guarantee the execution price; a stop-limit can remain unfilled.
- For a bar-close TradingView model, verify calculation and fill settings explicitly. Enabling historical-tick recalculation changes the model; barstate.isconfirmed alone does not enforce historical close-only execution in that mode.
- Review generated strategy code and chart orders before using a performance report. Pineify can help express the rules but does not establish an edge.