TL;DR: Post #13 ended with a question: the stop was the exit doing all the damage, so what happens when it widens to 2×ATR? The stop count fell 38 → 18, and the net improved from −$2,572.67 to −$880.55. But half of that "improvement" is not a better bracket — it is 10 trades the strategy never took, because the wider stop kept it in positions when the next entry signal fired. On the 49 entries both runs share, the gain is +$841.60, and the 18 stops that still fired cost nearly twice as much each (−$311.79 vs −$161.95). Widening the stop is a trade, not a fix: you pay double on the stops that still fire, to buy room for the ones that escape.
| 1×ATR stop (#13) | 2×ATR stop (#14) | |
|---|---|---|
| Closed trades | 58 | 48 |
| Limit exits | 14 | 16 |
| Stop exits | 38 | 18 |
| Time exits | 6 | 14 |
| Net profit | −$2,572.67 | −$880.55 |
| Profit Factor | 0.587 | 0.856 |
| Win rate | 19 / 58 (32.8%) | 24 / 48 (50.0%) |
The contract: one number, chosen before I looked
Post #13 pre-committed this test: same script, stop widened to 2×ATR, multiplier chosen before looking at the result. The contract for this post is three questions, in order:
- Does the stop count finally move?
- Does the net move with it, or does the average stop loss eat the gain?
- Does anything else change — entries, holds, gap fills — that the exit table hides?
The script is post #5's fixed RSI mean-reversion strategy, byte-identical apart from the stop multiplier — the compiled .py diffs clean against the 2×-limit base except for one number and the title string. Zero diagnostics from the local compiler. Same 4,089 daily bars of CSI 300 (2010-01-04 → 2026-11-06), same $10,000, same PyneCore patched runtime, no commission, no slippage.
The one-line change, in Pine:
if inTrade
strategy.exit("Exit Long", "Long", limit=strategy.position_avg_price + atrVal * 2, stop=strategy.position_avg_price - atrVal * 2)
if barsInTrade >= maxHold
strategy.close("Long", comment="Time exit")
And the compiled Python, verbatim from the local compiler (node bin/pine2pyne.mjs, zero diagnostics) — the only line that differs from the base run:
strategy.exit("Exit Long", "Long", limit=(strategy.position_avg_price + (atrVal * 2)), stop=(strategy.position_avg_price - (atrVal * 2)))
What you're checking here:
- Does doubling the stop halve the stop count, or does the market just find the wider level?
- When the stop count falls, does the net follow — or does each remaining stop cost more?
- Does a bracket change touch anything besides exits?
Probe 1: the exit split at 2×ATR — the stop count moved, the stop didn't go away
| Exit reason | Trades | Wins | Net | Avg per trade | Avg hold |
|---|---|---|---|---|---|
| Limit (2×ATR) | 16 | 16 | +$3,840.08 | +$240.01 | 3.4 bars |
| Stop (2×ATR) | 18 | 0 | −$5,612.15 | −$311.79 | 4.1 bars |
| Time (10 bars) | 14 | 8 | +$891.52 | +$63.68 | 10.0 bars |
The stop count did move: 38 → 18. But read the average column before celebrating. The average stop loss nearly doubled, −$161.95 → −$311.79, because the level is twice as far from the entry. The stop column as a whole improved only $541.79 (−$6,153.94 → −$5,612.15) despite 20 fewer stops. The limit column improved $1,104.68 (+$2,735.40 → +$3,840.08) and the time column $45.65 — and the total net improved $1,692.12.
Three verdicts hiding in that table:
The stop is still the strategy. 18 of 48 exits (37.5%) are stops, down from 65.5% — but the stop has still never once produced a winner, and its average loss is now larger than the limit's average win ($311.79 vs $240.01). A strategy whose most common exit loses more per trade than its best exit wins is still a strategy built around its stop.
The limit got better by accident, again. The limit's average win rose from +$195.39 to +$240.01 — not because the limit changed (it didn't), but because the trades that reach it now are the ones that survived a wider stop. Same mechanism as #13's accidental time exit: change one exit and the other exits' numbers move, because the trade population reaching them changed.
The win rate doubled and means nothing yet. 32.8% → 50.0% looks like a transformation. It is mostly arithmetic: the denominator shrank (58 → 48 trades) while the numerator grew by 5. A 50% win rate with a Profit Factor of 0.856 still loses money, and still loses to buy & hold (+$1,468.22 on the same span).
Probe 2: the bracket change ate 10 entries
This is the part the exit table hides. The base run took 59 entries. This run took 49. Ten entry signals vanished — not because the signal changed (the RSI crossover is identical), but because the strategy was already in a trade when the signal fired, and the script only enters if longSignal and not inTrade. No pyramiding, so a longer hold blocks the next entry.
I checked all ten. Nine were blocked by a trade the wider stop kept open — a stop that now fires at 4.1 bars instead of 2.7, a limit that now fires at 3.4, a time exit at bar 10. The tenth is the final bar's signal, blocked by the still-open last trade.
| Missing entry bar | Blocked by | In the base run it was |
|---|---|---|
| 81, 481, 1463, 1467 | a trade the wider stop held longer | STOP (−$537.09, −$149.04, −$327.68, −$202.79) |
| 93, 981, 1338 | a 10-bar time exit | STOP / LIMIT / TIME |
| 652, 850 | a limit exit | LIMIT (+$259.95, +$193.48) |
| 4087 | the still-open last trade | OPEN |
Those 10 skipped trades lost −$850.53 in the base run. Half of this post's $1,692.12 "improvement" is trades the strategy simply didn't take. That is not a better bracket. It is a smaller sample, and the smaller sample happened to skip losers. On a different stretch of data the same mechanism skips winners — the two skipped limits were worth +$453.43 in the base run, and they are gone too.
A bracket change is an entry change. Any exit rule that changes how long you hold changes which signals you can take. If you compare two brackets by net alone, you are comparing two different trade lists and calling the difference a bracket effect. The clean comparison is the next probe.
Probe 3: same entry, different exit — the matched 49
Forty-nine entries appear in both runs. On those, and only those, the comparison is clean:
| Transition (1× stop → 2× stop) | Trades | Base net | New net | Delta |
|---|---|---|---|---|
| STOP → LIMIT | 4 | −$408.42 | +$881.45 | +$1,289.86 |
| STOP → TIME | 9 | −$1,324.72 | +$306.24 | +$1,630.96 |
| STOP → STOP | 18 | −$2,687.68 | −$5,612.15 | −$2,924.47 |
| LIMIT → LIMIT | 12 | +$2,281.97 | +$2,958.64 | +$676.67 |
| TIME → TIME | 5 | — | — | +$168.58 |
| STOP → OPEN | 1 | — | — | — |
| Common-entry total | 49 | −$1,722.15 | −$880.55 | +$841.60 |
This is the real price of widening the stop, with the entry-stream confound removed. Thirteen trades escaped the stop — 4 became limits, 9 became time exits — and those 13 are worth +$2,920.82. But the 18 stops that still fired got $2,924.47 worse, almost exactly cancelling the escape. The net gain on identical entries is +$841.60, and $676.67 of that is the 12 limit trades that were limits in both runs but held longer and won more — the same accidental-improvement mechanism as Probe 1, now measured on matched trades.
So the honest sentence is: widening the stop bought 13 escapes for $2,924.47, and the escapes were worth $2,920.82. A wash, plus a little. The remaining +$841.60 is mostly limit trades drifting further before they hit the same target — a second-order effect, not a stop effect at all.
One trade deserves a line of its own. Trade #2 is the worst trade in both runs: −$508.83, identical to the cent. In the base run it gapped through the 1× stop; in this run the bar opened below the 2× stop as well, so it filled at the same open. A gap that jumps your stop jumps the wider stop too. Widening the stop protects you from the drift-through stops, not from the gap-through ones — and the gap-through ones are the expensive ones.
Probe 4: the gap-through shrank — the one unambiguous win
Of the 18 stops at 2×ATR, only 3 filled at the exit bar's open (vs 18 of 38 at 1×ATR). The extra loss vs the level the script actually set:
| Gap fills | Extra vs level | |
|---|---|---|
| Stop exits | 3 of 18 | −$227.75 |
| Limit exits | 0 of 16 | $0.00 |
| Net gap effect | 3 of 34 | −$227.75 |
Against #13's −$1,094.28, that is the one clean improvement in this post: $866.53 of gap-through cost gone, because a wider stop sits further from the open and fewer bars open past it. The verification holds too — every non-gap bracket fill in this run lands exactly on the level computed from the previous bar's ATR (distance 0.0000 ATR), same as #13.
But note the scale: the gap saving ($866.53) is smaller than the extra loss on the 18 stops that still fired ($2,924.47). The gap win is real and it is not enough.
Rules I now follow
- Count exits by reason before tuning anything. (From #13 — still the first rule. The stop count halved and the story is still in the exit split, not the net.)
- A bracket change is an entry change. If a wider exit keeps you in trades longer, it blocks entries. Report the entry count alongside the exit count, or the net comparison is fiction.
- Match trades before claiming an effect. Same entry, different exit is the only clean comparison. The headline delta (+$1,692.12) was half entry-stream luck; the matched delta (+$841.60) is the bracket's actual effect.
- Price the escape, don't just count it. Thirteen trades escaped the stop — and the eighteen that didn't cost $2,924.47 more. An escape count without the price of the stops that remain is marketing.
- The stop is the strategy until proven otherwise. At 1×ATR the stop was 65.5% of exits; at 2×ATR it is 37.5% and still the largest loss column. Widen it again and the count falls further — but the average loss doubles again, and the entry stream thins further. There is a width where the stop stops being an exit and becomes a hope.
What this post gives you, and what it doesn't
This post gives you: the full exit-by-reason count at a 2×ATR stop on 4,089 daily bars (16 limit / 18 stop / 14 time), the matched-trade decomposition that separates the bracket effect (+$841.60) from the entry-stream effect ($850.53 of skipped trades), and the gap-through measured in dollars ($227.75, down from $1,094.28).
This post does not give you: a better bracket, or a verdict on RSI mean reversion. All variants lose money; the Profit Factor crawled from 0.587 to 0.856 and is still below 1.0, still below buy & hold. It also doesn't test the question #13's accidental finding raised — what happens when the limit is removed entirely and the 10-bar time exit runs the bracket alone, since the time exit keeps absorbing the trades the other exits give up. That is the next post, and the setup will be fixed before I look at the result: same script, no limit, stop 2×ATR, 10-bar time exit.
Next in the series: the limit removed — stop 2×ATR and the time exit alone, counting whether the limit was doing anything at all.
Do you tune your stop by the exit count, or by the net — and have you ever checked whether the change also ate your entries? I read every comment — the exit-split stories are what the next posts are built from.
This conversion work was done by Pine2Py, the tool I build for exactly this job: paste a Pine script, get PyneCore-flavored Python back, diagnostics included when something can't be translated. The runtime is the open-source PyneCore project, with a patched build we ship for the two constructs stock PyneCore doesn't handle — details are on the site. It's free to try — every account gets 3 conversions, no card — and Pro is $12/month if you end up converting a whole library. No return promises, ever: a translator moves your logic, it doesn't make it profitable.
Top comments (0)