Pullback entry versus breakout entry
Both approaches can express a trend-continuation hypothesis, but they enter at different stages. Buying a breakout responds to strength through a reference level. Waiting for a pullback adds a retracement and recovery requirement. It can produce an entry below the earlier high, but confirmation and gaps can remove that price advantage.
| Decision | Buy the breakout | Wait for the pullback |
|---|
| Signal | Price exceeds a previously defined high. | Price retraces, stays within the allowed depth and then resumes upward. |
| Uninterrupted advance | May qualify for an entry. | Can leave the strategy with no trade. |
| Failed continuation | The breakout can reverse back into its old range. | The apparent dip can become a sustained decline. |
| Fair comparison | Keep its own signal and actual fill timestamps. | Count missed advances and cancellations as well as filled trades. |
An explicit long-side baseline
These are custom, untested rules, not standard settings or a claim about optimal retracement depth. Use standard daily candles, one chosen session and feed, at least 250 completed bars, and valid EMA values. Use one share with sufficient capital, one position at a time and no additions. A session means one daily bar in this test.
- Keep H and L unchanged while the setup is active. There is no entry during the anchor session. The next five sessions are numbered one through five; a valid trigger on session five is allowed before expiry.
- After cancellation, expiry or a completed trade, return to idle. Do not arm again on that same session. A later qualifying breakout close is required for a new setup.
- Missing required history means no setup. Fix feed, session and price-adjustment settings before comparing runs. A short-side version needs separate reversed rules and execution assumptions.
| Stage | Rule | Information available |
|---|
| Prior trend | The close is above EMA20, EMA20 is above EMA50, and EMA50 is above its value five sessions earlier. All inequalities are strict. | Evaluate on completed daily closes using closing-price EMAs. |
| Arm the setup | While flat and idle, require a close above the highest high of the previous 20 sessions, excluding today. Freeze H as today's high and L as the lowest low of the preceding 10 sessions. Require H > L; set D = H - L. | This breakout identifies the reference move; it does not place an entry. |
| Recognize the retracement | During the next five sessions, a close below the previous close and a low at or below H - 0.20D start the pullback. A low below H - 0.50D cancels it. | The allowed depth is 20% to 50% of the frozen range. L is a mechanical anchor, not a hindsight swing low. |
| Confirm renewed strength | On a later session after pullback recognition, require a close above the previous session high and strictly below H. The prior-trend test must still pass. | Recognition and confirmation cannot happen on the same bar. |
| Expire or invalidate | Before entry, cancel if any low is below H - 0.50D, the trend test fails, or any high exceeds H. Evaluate these before confirmation. If session five closes without a trigger, expire the setup. | A new high ends this particular frozen setup even if the trend continues. |
Specify orders and exits before measuring results
After a valid trigger closes, submit a market buy. TradingView documents that, with default bar-close calculation, the earliest fill is the next bar open. The trigger close is a decision price, not a guaranteed execution price.
- Freeze the stop S one minimum tick below the lowest low from session one through the trigger session. Submit an exit bracket linked to the entry, with stop S and target H, so protection does not wait for the entry-day close. Do not trail either level.
- Count the entry session as zero. If still open at the close of session five after entry, submit a market exit; keep the protective bracket until the position closes and then cancel remaining exit orders. Ignore other entry signals while an entry is pending or a position is open.
- If an opening gap fills the buy at or beyond either exit level, keep the fill and subsequent executable exit in the record. Do not delete the trade using information unavailable at the trigger close. Planned stop distance is not a maximum possible loss.
Worked example: a 30% retracement and a valid recovery
All numbers here are hypothetical. Suppose the trend test passes, the prior 20-session high is 109, the anchor closes at 109.80 with H = 110, and the preceding 10-session low is L = 100. D is 10, so recognition requires a low at or below 108 and invalidation occurs below 105. Assume a 0.01 minimum tick and that the trend test continues to pass.
- The example deliberately shows a small reward relative to the stop distance. A qualifying pullback does not guarantee an attractive payoff. Do not label this setup a 2:1 trade merely because entry is below the old high.
- If session three instead trades down to 104.99, cancel even if it closes at 109.50. A bullish close cannot repair the earlier depth breach.
- A separate version could require a minimum target-to-stop ratio calculated at the trigger close. Predeclare it and test it separately; the later entry fill can still change that ratio.
| Session | Observed prices or calculation | Decision |
|---|
| One | High 109.90, low 108.50, close 109. | Lower close, but depth is only 15%; no recognized pullback. |
| Two | High 109.20, low 107, close 108. | Lower close and depth (110 - 107) / 10 = 30%; recognize the pullback. |
| Three | High 109.80, low 107.50, close 109.50. | Close exceeds the previous high 109.20 and remains below 110; submit entry. |
| Frozen bracket | S = 107 - 0.01 = 106.99; target = 110. | Neither level moves after the trigger. |
| Assumed next open | Fill 109.55; stop distance 2.56; target distance 0.45. | Gross target-to-stop ratio is about 0.18, before costs. |
When the market offers no second chance
Starting from H = 110, suppose the next session has a low of 109.70, high of 112 and close of 111.80. Price never reaches the 108 recognition level and prints a new high, so this setup cancels without an entry. If later sessions keep rising without a qualifying retracement, the pullback strategy stays out. A breakout strategy may participate in that same advance; neither outcome proves which method is better across a sample.
- Record the advance as an unfilled opportunity under these rules. Do not backfill an imaginary purchase at 108 or convert to a breakout entry after seeing the rally.
- An expired setup stays expired. A recovery after its five-session deadline cannot authorize an earlier trade.
- A valid signal can still lose. Schwab's bull-trap example shows how an apparent resumption after a pullback can give way to lower lows. Confirmation defines an action; it does not certify the future trend.
Test the sequence, then compare outcomes
Before reading profit statistics, inspect several accepted setups, depth failures, new-high cancellations and expiries against the chart. Save anchor prices and timestamps for each state change. The research question is whether waiting for this specific retracement improves results enough to justify the opportunities it excludes.
- Keep an earlier development period and a later untouched evaluation period. Freeze the trend lengths, anchor windows, depth band and expiry before using the later dates.
- For a breakout comparison, define its entry at the anchor close decision, next available fill and its own exits in advance. Hold symbol, dates, capital and cost assumptions constant; report exposure and risk as well as profit.
- Count all armed setups, recognized pullbacks, rejected triggers, trades and no-trade outcomes. Report net result per trade, drawdown and time in market beside the counts.
- TradingView uses broker-emulator assumptions for historical fills. Inspect bars touching both exits, test available lower-timeframe detail with Bar Magnifier, and include commission and slippage. A gap can execute a stop at a worse price than its level. Standard candles avoid the default synthetic-price problem of non-standard chart backtests.
Implement the states and review execution
Give Pine Script AI Coding Agent the rule table, precedence rules and example prices. Ask it to represent idle, waiting for retracement, waiting for recovery and position-open states, with frozen anchors and a visible cancellation reason. Review and syntax-check the generated script, then compare its signals with the worked example before interpreting a backtest.
- Use Trading Journal plan notes for the frozen rules and review notes for actual entry, stop, exit and deviations. Its setup and missed-trade fields can distinguish a skipped valid trigger from a setup that never qualified.
- A no-pullback rally is not a missed valid signal. Keep that distinction in your notes so hindsight does not turn disciplined non-entry into an execution error.
- Neither the article nor the journal executes these rules. Generated code requires review; syntax validity alone does not establish correct trade timing or a profitable strategy.