I Doubled the Hold to 20 Bars. The "Profitable" Strategy Gave Back a Third.
TL;DR: Post #15 ended with a pre-commitment: same script, no limit, stop 2×ATR, 20-bar time exit — to test whether the 10-bar hold was the reason the strategy turned profitable, or just the window the rally happened to fit. The answer is in: net +$1,578.25, Profit Factor 1.200, in our testing — down from +$2,420.59 / 1.378 at 10 bars. The entry stream is byte-identical (49 = 49), so every dollar of the -$842.34 is an exit effect, and it decomposes cleanly: the 24 trades that survived to bar 20 gained +299.31 points, but 6 trades that used to exit at bar 10 ran into the stop instead and lost -476.34 points. And the concentration check still fails: net minus the biggest trade is +$100.47. Ten bars was the lucky number — or at least, twenty isn't the answer.
| Hold 10 bars (#15) | Hold 20 bars (#16) | |
|---|---|---|
| Closed trades | 48 | 48 |
| Stop exits | 18 | 24 |
| Time exits | 30 | 24 |
| Net profit | +$2,420.59 | +$1,578.25 |
| Profit Factor | 1.378 | 1.200 |
| Win rate | 23 / 48 (47.9%) | 19 / 48 (39.6%) |
The contract: one question, chosen before I looked
Post #15 pre-committed this test, word for word: same script, no limit, stop 2×ATR, 20-bar time exit. The contract for this post is three questions, in order:
- Does the longer hold keep the profit — or was 10 bars the lucky number?
- Is the comparison clean this time, or does the entry stream move again?
- If the net falls, what exactly eats it — the trades that survive longer, or the ones that don't survive at all?
The script is post #5's fixed RSI mean-reversion strategy, byte-identical apart from the maxHold default and the title string — the compiled .py diffs clean against the #15 base except for two lines. 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:
maxHold = input.int(20, "Max hold (bars)", minval=1)
And the compiled Python, verbatim from the local compiler (node bin/pine2pyne.mjs, zero diagnostics) — the only lines that differ from the #15 run:
_pyne_in_maxHold: int = input.int(20, "Max hold (bars)", minval=1)
What you're checking here:
- Does doubling the hold change the net — or just move wins from one exit column to another?
- Does a bracket change touch the entry stream again, like it did in #14?
- If the strategy gives back a third of its profit, which trades did the giving back?
Probe 1: the exit split — the stop is now half the strategy
| Exit reason | Trades | Wins | Net | Avg per trade | Avg hold |
|---|---|---|---|---|---|
| Stop (2×ATR) | 24 | 0 | −$7,262.61 | −$302.61 | 6.6 bars |
| Time (20 bars) | 24 | 19 | +$8,840.86 | +$368.37 | 20.0 bars |
Six more stops than #15, six fewer time exits — the same six trades, as Probe 2 shows. The stop column is still winless (24 of 24 losses) and still the largest loss column; its average loss crept up again, −$321.03 → −$302.61 in dollars but the count is what matters — half of all exits are now stops. The time exit's average win rose (+$273.30 → +$368.37) because the trades that survive 20 bars are the ones that kept going — but there are fewer of them, and the win rate fell 47.9% → 39.6%.
Two verdicts hiding in that table:
The longer hold didn't buy patience. It bought exposure to the stop. The 24 trades that made it to bar 20 are worth more each — but 6 trades never got there, and those 6 cost more than the extra 10 bars earned the other 24. That is the whole post in one sentence, and Probe 2 puts numbers on it.
The stop is still the strategy. 24 of 48 exits are stops, 0 wins, −$7,262.61 — larger than the time exit's average win in absolute terms ($302.61 vs $368.37 is closer now, but the stop column is still 82% of the time column's net). Doubling the hold did not fix the stop. It fed it.
Probe 2: the matched 49 — where the $842.34 went
The entry stream did not move at all: 49 entries in #15, 49 entries in #16, identical bars, identical prices. The comparison is fully clean again: same entries, different exits, and the delta is purely an exit effect.
| Transition (#15 → #16) | Trades | Dollar delta | Point delta |
|---|---|---|---|
| TIME → TIME | 24 | +$331.61 | +299.31 pts |
| TIME → STOP | 6 | −$1,173.95 | −476.34 pts |
| STOP → STOP | 18 | $0.00 | +0.00 pts |
| OPEN → OPEN | 1 | — | — |
| Total | 49 | −$842.34 | −177.03 pts |
Read the point column before the dollar column — the rule from #15. In points, the 18 stops are worth exactly what they were worth in #15 (+0.00 pts), and they are dollar-identical to the cent too (verified: max absolute dollar delta $0.00 across the 18 — their contract counts never moved). All -177.03 points of the decline come from the 6 trades that used to exit at bar 10 and instead ran into the stop between bars 11 and 20, partly offset by +299.31 points from the 24 that survived to bar 20. One mechanism, one number, no confound.
The dollar delta (-$842.34) is slightly worse than the point delta implies, because of sizing: three late trades entered with 2 contracts in #16 instead of 3 in #15 (the account was smaller by then — the equity path is itself an outcome of the earlier exits). Trade #45 is the case to see in full:
- Trade #45 (entry 2024-09-20 @ 3,192.43): #15 exited at bar 10 for +$2,331.99 (3 contracts, +777.33 pts). #16 held to bar 20 for +$1,477.78 (2 contracts, +738.89 pts). Of the -$854.21, only -$115.32 is price (-38.44 pts × 3 contracts) — the other -$738.89 is one fewer contract. The rally trade gave back $854.21, and most of it is sizing, not price.
Rule I now follow: when sizing is percent-of-equity, measure an exit change in points first and dollars second. (From #15 — and this post is the proof it was needed: the dollar delta and the point delta tell different stories about the same 6 trades.)
Probe 3: the six that didn't survive — named, not counted
This is the part a summary table hides. The 6 TIME → STOP trades, each with its bar-10 outcome in #15:
| Trade | Entry | #15 at bar 10 | #16 outcome | Hold |
|---|---|---|---|---|
| #6 | 2011-06-01 @ 2,996.08 | −$169.20 | −$274.48 stop | 11 |
| #12 | 2012-07-02 @ 2,473.54 | −$62.85 | −$244.92 stop (gap) | 11 |
| #17 | 2013-12-24 @ 2,291.12 | −$201.92 | −$298.40 stop (gap) | 12 |
| #27 | 2018-07-10 @ 3,464.91 | +$131.50 | −$254.08 stop | 17 |
| #42 | 2023-12-22 @ 3,329.47 | −$20.58 | −$252.32 stop | 17 |
| #44 | 2024-07-10 @ 3,425.88 | +$12.94 | −$159.87 stop | 18 |
Only one of the six was a winner at bar 10 (#27, +$131.50 → −$254.08 — a $385.58 swing on a single trade). The other five were small losers at bar 10 that the extra 10 bars turned into full stops. The extra hold didn't mostly kill winners. It mostly let small losers grow into full-size ones — and two of the six (#12, #17) gapped through the stop level on the way, which is Probe 5.
And the other side, for balance — the 24 that survived to bar 20: 19 winners, and the extra 10 bars were genuinely good to four of them (#47 +253.36 pts, $112.10 → $618.82; #14 +126.36 pts; #46 +128.13 pts; #5 +113.65 pts). But two winners flipped to losers in the extra window (#19 +$463.82 → −$100.96, -282.39 pts — the single worst extra-10-bars outcome; #31 +$266.12 → −$61.46, -163.79 pts). The extra 10 bars are not a filter that keeps winners and drops losers. They are a coin flip with a stop underneath it — and the stop collects first.
Probe 4: a few trades still carry the result — the concentration check
Same check as #15, same verdict. The top 5 winners are $5,023.45 of the $9,469.73 gross profit — 53.0%. And one trade still does almost all the work:
| Trade | Entry | Exit | Hold | Profit |
|---|---|---|---|---|
| #45 | 2024-09-20 @ 3,192.43 | 2024-10-25 @ 3,931.32 | 20 bars (time) | +$1,477.78 |
| #14 | — | — | 20 bars (time) | +$1,395.44 |
| #5 | — | — | 20 bars (time) | +$891.72 |
| #11 | — | — | 20 bars (time) | +$639.69 |
| #47 | — | — | 20 bars (time) | +$618.82 |
The honest arithmetic, again: net +$1,578.25 minus trade #45 = +$100.47. Without one trade, sixteen years of this strategy is breakeven — at 10 bars it was +$88.60, at 20 bars it is +$100.47. The two "profitable" variants agree on exactly one thing: the profit is one trade deep. Note the consolation that isn't one: trade #14 is now +$1,395.44 (up from $890.00 at 10 bars) — the second-biggest winner grew. But the top-5 share barely moved (55.7% → 53.0%), so the verdict doesn't.
One more comparison the headline hides: #16 beats buy & hold (+$1,468.22 on the same span) by $110.03. At 10 bars the margin was $952.37. The strategy is still ahead of doing nothing — by about the price of one average losing trade.
Probe 5: the gap-through got worse — five fills, not three
Of the 24 stops, 5 filled at the exit bar's open — up from 3 in #15, because two of the six new stops (#12, #17) gapped through. The extra loss vs the level the script actually set:
| Gap fills | Extra vs level | |
|---|---|---|
| Stop exits | 5 of 24 | −$243.35 (81.12 pts) |
| Net gap effect | 5 of 24 | −$243.35 |
The verification holds: every non-gap stop fill lands exactly on the level computed from the previous bar's ATR (distance 0.0000 ATR), same as #13, #14 and #15. The longer hold changed nothing about how stops fill. It only gave the price 10 more bars in which to gap through them.
Rules I now follow
- Count exits by reason before tuning anything. (From #13 — still the first rule. The stop column went 18 → 24 and the story is still in the exit split, not the net.)
- A bracket change is an entry change — until proven otherwise. (From #14. This time the entry stream provably didn't move again: 49 = 49, identical bars. Report the entry count alongside the exit count, or the net comparison is fiction.)
- Match trades before claiming an effect. (From #14. Same entry, different exit is the only clean comparison — and this post has one: all 49 entries matched, transitions counted.)
- Measure in points before dollars when sizing is percent-of-equity. (From #15. Trade #45's -$854.21 is -$115.32 of price and -$738.89 of sizing — the dollar number alone would blame the hold for what the contract count did.)
- A first profitable variant is a suspect until the concentration check clears it. (From #15. This one doesn't clear it either: 53.0%, and +$100.47 without trade #45.)
- Price the escape, don't just count it. (From #14. Six trades escaped the 10-bar exit — and they were worth -476.34 points. The count alone would have hidden which transition did the work.)
- A longer hold doesn't buy patience, it buys exposure to the stop. (New. The extra 10 bars gave the 24 survivors +299.31 points and handed 6 trades to the stop for -476.34. The hold is not a filter — it is a window, and the stop collects first.)
What this post gives you, and what it doesn't
This post gives you: the full exit-by-reason count with the hold doubled on 4,089 daily bars (0 limit / 24 stop / 24 time), the matched-trade decomposition on an identical 49-entry stream (-177.03 points, all from TIME → STOP), the six failed trades named with their bar-10 outcomes, the sizing decomposition on trade #45, and the concentration check (top-5 winners 53.0% of gross profit; net ex-trade-#45 +$100.47).
This post does not give you: a verdict on RSI mean reversion, or a best hold. 10 beats 20 by 177.03 points — but the curve has two points and the difference is one transition (6 trades) plus one trade's sizing. It also doesn't test whether the time exit should exist at all, or whether a trailing stop would keep the winners that the 20-bar hold kept while cutting the six that died. That is the next post, and the setup is fixed before I look at the result: same script, no limit, stop 2×ATR, 15-bar time exit — the middle point, to check whether 10 → 15 → 20 is a slope or noise.
Next in the series: the hold in the middle — 15 bars, counting whether the curve from 10 to 20 is a real slope or two lucky numbers.
What I couldn't verify
- Costs. No commission, no slippage, same as every post in this series. The 20-bar hold trades 49 times in 16 years, so costs would bite less here than on a fast strategy — but "less" is not a number, and I haven't run it with costs.
- The sizing. All dollar figures are percent-of-equity at 100% with 2–4 contracts in this run's size range. The point totals (-177.03 pts) travel; the dollar totals don't, because the contract count follows the equity path — trades #45, #46 and #49 entered with 2 contracts in this run vs 3 in #15.
- Whether 10 is special, or 20 is just unlucky. Two points don't make a curve. The 15-bar probe is the next post for exactly this reason — and if 15 lands between them, the honest conclusion is "the hold is noise in this range", not "10 is optimal".
- Out of sample. Same 4,089 bars as every post in the series. Nothing here has been tested on data the script hasn't already seen.
Bottom line
Doubling the hold gave back a third of the profit — net +$1,578.25, PF 1.200, in our testing — and the mechanism is fully accounted for: 6 trades that used to exit at bar 10 ran into the stop and lost 476.34 points, outweighing the 299.31 points the 24 survivors gained. Ten bars was the lucky number, or at least twenty isn't the answer — and either way the strategy is still one trade deep: without trade #45 the net is +$100.47. It's a breakeven strategy with a longer leash, not a better one.
Do you test a parameter change on matched trades — or do you just compare the two headline nets? I read every comment — the matched-trade 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)