The Count-Matched Clock Made $2,719. The 83-Bar Clock Made $9,870. The Win Was Mostly the Grid, Not the Count.
The short version. #24 ended with a question: the clock that made $9,870.59 on the S&P 500 had 51 signals against the RSI's 35 — was its win "even spacing" or just "more trades"? Same script, same exits (2×ATR stop + trailing stop), same $10,000, same 0.1% fee, same 4,252 bars, new rule: buy every 121st bar, exactly 35 signals, the same count as the RSI stream. In our testing:
- The count-matched clock fell back to the middle of the pack. It made +$2,719.03 (35 trades, PF 2.010) — the 75th percentile of the same 20-seed random-entry distribution, +0.96 standard deviations from its mean. Above the RSI's 50th percentile, above the placebo mean — but five random seeds beat it, and it is no longer extraordinary.
- The gap splits both ways, and spacing takes the bigger half. The 83-bar clock beat it by $7,151.56. Of that gap, $2,961.18 (41.4%) is the count effect — 15 fewer trades at the clock's expectancy — and $4,190.38 (58.6%) is the per-trade expectancy collapse, $197.41 down to $77.69. The clock's win was mostly not a trade-count effect. It was mostly which bars the grid landed on.
- The shape survived — the money didn't. The count-matched clock still looks like a clock: 54.3% wins, 19.9-bar holds, 77.1% trail exits, 47.1% top-five share. The form the exits impose is intact. What changed is the luck of the grid: the 83-bar grid bought three days after the COVID low (+$2,834.82); the 121-bar grid bought a month before the crash and got stopped out for −$195.32.
The contract: one question, chosen before I looked
24's closing line was the pre-commitment for this post, word for word: "the count-matched clock — every 121st bar, 35 signals, the same count as the RSI stream — to separate 'even spacing' from 'more trades.' If it keeps the edge, spacing is doing the work. If it falls back to the middle of the distribution, the clock's win was mostly a trade-count effect." The rules were fixed before I ran anything:
- Same script, same exits. The #22 policy-A script, entry swapped only:
longSignal = bar_index >= 121 and bar_index % 121 == 0, 2×ATR stop from the entry average price, trailing stop at highest close minus 2×ATR, 100% of equity, market orders, policy A drop, 0.1% round-trip fee, $10,000 starting equity, patched PyneCore runtime. Both scripts compiled with zero diagnostics; the fee/no-fee compiled Python differs in title + commission_value only. - 121 is the count-matched interval, computed before the run, not fitted after it. 4,252 bars / 35 signals = 121.5, rounded down to 121. On 4,252 bars the rule fires exactly 35 signals (121, 242, …, 4,235) — the same count as the RSI stream, verified from the signal list before running, not from the trade file after.
- Same data, same placebo. 4,252 bars of S&P 500 daily, 2010-01-04 to 2026-11-27 (Yahoo Finance ^GSPC), the same file #24 used. The placebo distribution is #24's twenty seeds, recomputed from #24's forty trade files — the numbers match #24's published distribution exactly (fee mean +$1,169.48, SD $1,621.21; no-fee mean +$1,462.11, SD $1,612.99), so the verdict bands are the same ones.
- Fee on and fee off, both. Each version lands in its matching distribution, the #24 correction applied from the start.
Probe 1: the distribution — the same twenty dice rolls
Closed trades only (exit Signal != 'Open'), the convention #18–#24 used. The full twenty-seed table is #24's Probe 1, unchanged; the summary bands the verdict rests on:
| Placebo, fee | Placebo, no fee | |
|---|---|---|
| Mean | +$1,169.48 | +$1,462.11 |
| SD | $1,621.21 | $1,612.99 |
| Median | +$851.22 | +$1,114.75 |
| Q1 … Q3 | −$216.92 … +$2,586.68 | $59.81 … +$2,978.80 |
| 1-SD band | −$451.73 … +$2,790.69 | −$150.88 … +$3,075.09 |
| Range | −$983.79 … +$3,673.34 | −$743.65 … +$4,164.39 |
| Positive seeds | 13 / 20 | 16 / 20 |
Against those bands, the three entries on the same market:
| Signals | Closed | Net, fee | PF, fee | Net, no fee | PF, no fee | |
|---|---|---|---|---|---|---|
| RSI baseline | 35 | 29 | +$1,029.36 | 1.207 | +$1,209.30 | 1.247 |
| Clock #24 (every 83rd) | 51 | 50 / 51 | +$9,870.59 | 3.070 | +$10,191.03 | 3.116 |
| Count-matched clock #25 (every 121st) | 35 | 35 / 35 | +$2,719.03 | 2.010 | +$2,942.48 | 2.112 |
One detail before the verdict: the count-matched clock fired all 35 signals in both runs — no skipped signals, no policy-A drops, no trade still open at the final bar. The 121-bar grid is spaced wide enough that a ~20-bar hold never overlaps the next signal, and the fee run never hit the quantity boundary that dropped the 83-bar clock's signal 2,241. The strategy file's net profit equals the closed-trade net exactly ($2,719.03), because there is no open trade to reconcile. The cleanest run in the series, mechanically — and still only 75th percentile.
Probe 2: where the count-matched clock sits
The verdict bands, both of them, from the fee-on placebo distribution:
| Placebo distribution | RSI (+$1,029.36) | Clock #24 (+$9,870.59) | EC clock #25 (+$2,719.03) | |
|---|---|---|---|---|
| Percentile | — | 50th (10 / 20 below) | 100th (20 / 20 below) | 75th (15 / 20 below) |
| Distance from mean | mean $1,169.48, SD $1,621.21 | −0.09 SD | +5.37 SD | +0.96 SD |
| Inside IQR? | −$216.92 … +$2,586.68 | yes | no | no (above Q3 by $132.35) |
| Inside 1-SD band? | −$451.73 … +$2,790.69 | yes | no | yes |
The no-fee picture is the same shape, one band friendlier:
| Placebo, no fee | RSI, no fee (+$1,209.30) | Clock #24, no fee (+$10,191.03) | EC clock #25, no fee (+$2,942.48) | |
|---|---|---|---|---|
| Percentile | — | 50th (10 / 20 below) | 100th (20 / 20 below) | 75th (15 / 20 below) |
| Distance from mean | mean $1,462.11, SD $1,612.99 | −0.16 SD | +5.41 SD | +0.92 SD |
| Inside IQR? | $59.81 … +$2,978.80 | yes | no | yes |
| Inside 1-SD band? | −$150.88 … +$3,075.09 | yes | no | yes |
Five of twenty random seeds beat the count-matched clock on net profit, with the fee on and with it off (seeds 4, 10, 11, 14, 16 in both). The 83-bar clock had zero seeds above it. So #24's pre-committed fork resolves on the second branch: the count-matched clock fell back toward the middle of the distribution. But it did not fall back to the middle — 75th percentile, +0.96 SD, is not the RSI's dead-center 50th. The honest sentence is the middle one: matching the count took most of the edge away, and left a residue that is above average but inside one standard deviation — the kind of result twenty seeds cannot distinguish from a lucky draw.
Probe 3: the fee doesn't move the verdict
Same test, no fee. The count-matched clock nets +$2,942.48 without the fee against +$2,719.03 with it — a drag of $223.45, smaller than the 83-bar clock's $320.44 and the RSI's $179.94 in absolute dollars, and with no fee/no-fee trade-count difference at all (35 closed in both runs). No policy-A story this time: the fee changed no trade's existence, only its size through the equity path, and the two runs hold the same 35 trades with the same entry and exit bars. The fee is a tax of $223.45 on this grid and nothing else — the verdict (75th percentile, inside 1 SD) is identical either way. That is what a control is for, and this one held a third time.
Probe 4: the count-matched clock — anatomy of a grid that missed the crash
The five trades that made it:
| Trade | Entry | Exit | Hold | Profit |
|---|---|---|---|---|
| #32 | 2025-05-28 @ 5,925.54 | 2025-08-04 @ 6,271.71, trail | 46 bars | +$680.14 |
| #26 | 2022-07-06 @ 3,831.98 | 2022-08-23 @ 4,133.09, trail | 34 bars | +$594.25 |
| #22 | 2020-08-03 @ 3,288.26 | 2020-09-04 @ 3,453.60, trail | 24 bars | +$485.91 |
| #9 | 2014-05-05 @ 1,879.45 | 2014-07-18 @ 1,961.54, trail | 52 bars | +$400.85 |
| #30 | 2024-06-07 @ 5,343.81 | 2024-07-19 @ 5,543.37, trail | 28 bars | +$388.23 |
The top five total $2,549.38 — 47.1% of gross profit, the flattest top-five share in the series (the 83-bar clock's was 49.8%, the RSI's 73.1%). The biggest winner is $680.14, 25.0% of the net — and the net survives it comfortably at +$2,038.88. Nothing here is a single-trade story. The story is what isn't in the table.
The 83-bar grid's biggest winner was trade #30: entry 2020-03-26 @ 2,501.29, three days after the COVID low, +$2,834.82. The 121-bar grid's nearest signals bracket it and miss it both ways: signal 2,541, entry 2020-02-10 @ 3,318.28 — a month before the crash, stopped out 2020-02-24 for −$195.32; then signal 2,662, entry 2020-08-03 @ 3,288.26, after most of the recovery was already done, +$485.91. The same pattern holds down the 83-bar clock's top five: its #2 (2010-09-01, +$1,295.53) has no 121-grid counterpart anywhere near it — the nearest 121-grid entry is 2010-06-29, a −$400.94 stop-out; its #41 (2023-11-09, +$1,205.86) meets a 121-grid entry five weeks later for +$93.10. Of the 83-bar clock's top five, only one — #37, the 2022-07-18 entry — has a 121-grid trade in the same move, and even that one shares only the exit: both trails triggered on 2022-08-23 @ 4,133.09, the 121-grid entry twelve days earlier making +$594.25 against the 83-grid's +$981.17.
That is the decomposition, in trade form. And here it is in arithmetic — net equals closed trades times expectancy, so the $7,151.56 fee gap between the two clocks splits exactly:
| #24 clock (51 signals) | #25 EC clock (35 signals) | Gap | |
|---|---|---|---|
| Net, fee | +$9,870.59 | +$2,719.03 | $7,151.56 |
| Closed trades | 50 | 35 | 15 |
| Expectancy per trade | $197.41 | $77.69 | $119.72 |
| Count effect (15 fewer trades × clock expectancy) | — | — | $2,961.18 (41.4%) |
| Spacing effect (35 EC trades × expectancy change) | — | — | $4,190.38 (58.6%) |
The no-fee split says the same thing: gap $7,248.55, count effect $3,197.19 (44.1%), spacing effect $4,051.36 (55.9%). So #24's fork resolves against the first branch: the clock's win was mostly not a trade-count effect. Fewer trades explain about two-fifths of the gap. The other three-fifths is that each trade on the 121-grid earned $119.72 less on average — because the 121-grid's entries landed on worse bars. One honest caveat, stated now rather than buried: this decomposition is arithmetic, not causal. It separates "fewer trades" from "each trade earned less," but it cannot say whether the 121-grid earned less because 121 is a worse spacing or because this particular grid happened to miss the COVID low. The next post is built to answer exactly that.
Buy and hold, for scale, as in #24: $10,000 into the index over the same window becomes $64,409.13 (+544.1%). The count-matched clock's +$2,719.03, the 83-bar clock's +$9,870.59, the RSI's +$1,029.36 — all far below doing nothing. The count-matched clock is above average among trading rules on these exits. It is not above average among ways to own the S&P 500 for seventeen years. Both sentences are true, and the second one is the one that matters if you're choosing what to do with money.
Probe 5: what the exits do alone — and where the shape holds
Strip the entry out and the system keeps its shape — for all three entries this time. The count-matched clock is a clock in form, just a poorer one in money.
| Placebo mean | RSI baseline | Clock #24 | EC clock #25 | |
|---|---|---|---|---|
| Avg hold (fee) | 16.23 bars | 17.62 bars | 20.60 bars | 19.86 bars |
| Win rate (fee) | 39.3% | 37.9% | 52.0% | 54.3% |
| Trail / stop exit mix (fee) | 68.9% trail | 69.0% trail (20 / 29) | 76.0% trail (38 / 50) | 77.1% trail (27 / 35) |
| Top-5 winners' share of gross profit (fee) | 74.7% | 73.1% | 49.8% | 47.1% |
| Surviving the biggest winner (fee) | 10 / 20 seeds | no (−$13.96) | yes (+$7,035.77) | yes (+$2,038.88) |
| Median trade (fee) | — | — | — | +$63.44 |
| PF (fee) | 1.428 | 1.207 | 3.070 | 2.010 |
| Expectancy per trade (fee) | $37.37 | $35.50 | $197.41 | $77.69 |
| Time in market (fee) | 11.9% | 12.0% | 24.2% | 16.3% |
The no-fee table says the same thing: placebo mean 16.28-bar holds, 40.1% wins, 73.5% top-five share; RSI 17.62 bars, 37.9% wins, 72.7% top-five; clock #24 20.29 bars, 54.9% wins, 49.1% top-five; EC clock 19.86 bars, 54.3% wins, 46.5% top-five, expectancy $84.07.
So #24's revision holds, and #25 sharpens it: the exits set the form; the entry's exposure to the drift sets how much the form gets to eat — and the grid's phase decides which drift it eats. Both clocks share the form: ~20-bar holds, ~53% wins, ~77% trail exits, flat profit distribution, survival of the biggest winner. The RSI and the dice share the other form: ~17-bar holds, ~38% wins, ~70% trail exits, concentrated profit. What separates the two clocks from each other is not form but fortune: the 83-bar grid's phase put a trade three days after the COVID low and kept it in the market 24.2% of the window; the 121-bar grid's phase put a trade a month before the crash and kept it in 16.3%. Same exits, same fee, same market — a different phase, $7,151.56 apart.
How I checked the numbers
The count-matched clock, two trades, by hand against the trade file and the raw feed — the method, so anyone can repeat it:
- Signal count, before the run. The rule
bar_index >= 121 and bar_index % 121 == 0produces exactly 35 signals on 4,252 bars (121, 242, …, 4,235). All 35 fired in both runs: every entry bar in the trade files equals its signal bar + 1, with zero skipped signals, zero policy-A drops, and zero trades still open at the final bar. The strategy file's net profit equals the closed-trade net exactly ($2,719.03 fee, $2,942.48 no-fee). - Trade 1 (entry bar 122, exit 124, stop): signal bar 121 is in the list; entry price 1,071.10 equals the feed open of bar 122; the exit price 1,027.60 is not the open of bar 124 (1,031.10) — it is the resting stop, entry average minus 2×ATR of bar 123 (1,071.10 − 2×21.75 = 1,027.60), breached intrabar on bar 124 (low 1,010.91) and not breached on bar 123 (low 1,028.33). The stop is re-evaluated every bar, so the level in force on the exit bar is the one set at the previous bar's close — the same rule #24's one-bar trade verified with ATR[entry]. Profit −$400.94 recomputed from the two prices, 9 contracts, and 0.05% per side — exact to the cent.
- Biggest winner, trade #32 (entry bar 3,873, exit 3,919, trail): entry 2025-05-28 @ 5,925.54 equals the feed open of bar 3,873, 2 contracts; exit 2025-08-04 @ 6,271.71 equals the feed open of bar 3,919; recomputing the trailing level from closes and Wilder ATR(14), the first close below the trail falls on bar 3,918 — exit bar minus one, exactly as a close-triggered exit filling at the next open should; profit +$680.14 recomputed exact.
- The COVID miss. The 83-bar clock's trade #30 entered bar 2,574 (2020-03-26 @ 2,501.29). The 121-grid's nearest signals are 2,541 (entry 2020-02-10, −$195.32) and 2,662 (entry 2020-08-03, +$485.91) — both verified in the trade file.
- Placebo reuse. The distribution was recomputed from #24's forty trade files, not copied from its summary: fee mean +$1,169.48, SD $1,621.21; no-fee mean +$1,462.11, SD $1,612.99 — identical to #24's published values to the cent. Both EC scripts compiled with zero diagnostics; the fee/no-fee .py diff is title + commission_value only.
What I couldn't verify
- The decomposition is arithmetic, not causal. The count/spacing split (41.4% / 58.6% fee) separates "fewer trades" from "each trade earned less," but the spacing half bundles two things I haven't separated: the 121 spacing itself, and this particular grid's phase luck (missing the COVID low by a month). A phase-shifted 83-bar clock — same spacing, different starting bar — is the test that separates them, and it isn't run yet.
- One grid phase per spacing. I tested one 121-grid (starting at bar 121) and #24 tested one 83-grid (starting at bar 83). A spacing's "true" performance is a distribution over phases; I have one draw each. The 75th-percentile verdict is about this grid, not about 121-bar spacing in general.
- 20 seeds, not 50. Twenty draws pin the RSI to the middle and the count-matched clock to the 75th percentile, but the tails are thin: five seeds beat the EC clock, and one more seed either way would move the percentile by five points. Fifty seeds would tighten it; the verdict (inside 1 SD, above the IQR top on fee) would need a large move to change.
- Uniform random bars are not a realistic null. Real entries cluster — RSI signals cluster on selloff days. The placebo draws uniformly, so it doesn't test "entry timing within selloffs" — only "entry timing, period." A clustered placebo (random bars drawn only from down days) is a sharper null and isn't run yet.
- The exits are untested as an edge. The placebo says the entry adds nothing given these exits. It doesn't say the exits have an edge — the mean random entry is 3.23 standard errors from zero on this market, but that is the drift talking, and buy-and-hold beats even the 83-bar clock by more than 6×.
- One fee level, one sizing rule. All fee-on runs carry the same 0.1% round trip and 100%-of-equity sizing. The count-matched clock happened to avoid the quantity boundary entirely (35/35 fired both ways); a fixed fractional size would move the boundary, and a different grid might hit it.
Bottom line
24 asked whether the clock's win was even spacing or more trades, and pre-committed the fork. The count-matched clock answers it: mostly neither — it was the grid. Matching the count to the RSI's 35 signals took the clock from the 100th percentile (+5.37 SD, +$9,870.59) to the 75th (+0.96 SD, +$2,719.03), and the arithmetic says only about two-fifths of that $7,151.56 fall is the missing trades. The rest is per-trade expectancy, $197.41 down to $77.69, because the 121-bar grid bought a month before the COVID crash instead of three days after the low. The form the exits impose survived intact — 54.3% wins, 19.9-bar holds, 77.1% trail exits — which is the third post in a row where the exits, not the entry, decide what the system looks like. What the entry decides is which slice of the market's drift the form gets to eat, and on a market that rose 544%, the slice depends on the phase of the grid as much as anything the trader chose. None of it — not the RSI, not the dice, not either clock — comes close to buying the index and doing nothing, which turned $10,000 into $64,409.13 over the same window.
Next post (#26): the phase-shifted clock — same 83-bar spacing, offset by 41 bars, 51 signals — to separate "even spacing" from "this particular grid happened to buy the COVID low." If the shifted grid also wins, spacing is doing the work. If it falls back to the middle, the 83-bar clock's win was one lucky phase, and the story changes again.
Disclosure: I built Pine2Py (pine2py.com), the Pine Script → Python converter this series runs on. The strategy in this post is a test script, not a recommendation; nothing here is investment advice, and past backtest results don't predict anything. Free accounts get 3 conversions total; Pro is $12/month via Paddle. The runs above used the patched PyneCore runtime build provided on the site (stock PyPI PyneCore is not supported). All numbers are from local runs on 2026-12-01, in our testing: 1,909 real-world scripts compile at 99.7% and fully translate at 98.4%.
