Bitcoin five-minute range breakout backtest case study
TradingView remains a supported secondary workflow. Inspect the chain from starting thesis to structured rules, versioned Pine Script, backtest review, controlled refinement, and the limitations that remain unresolved.
What this demonstrates
One strategy moved through Evaluate, Design, Generate, external backtesting, and Evolve while prior-version reasoning remained connected.
What it does not prove
Profitability, after-cost viability, exact reproducibility, forward performance, or a byte-for-byte link between local artifacts and the scripts executed in TradingView.
01 · Original thesis
A simple, falsifiable starting idea
The original prompt used TradingView’s BTC1! symbol for CME Bitcoin futures:
“What are three great indicators for daytrading the BTC1! five minute chart? I’d want to do a breakout strategy so make the indicators revolve around that.”
Evaluate assigned distinct roles to Range, ATR, and DMI: Range defines the boundary, ATR defines a volatility-scaled clearance and risk distance, and DMI confirms direction. The testable hypothesis was that a five-minute close beyond the prior short-term range by 0.25 ATR, with directional pressure aligned, might identify breakouts worth testing. It was not treated as a market prediction.
02 · Evaluation Brief
Risks and open choices were surfaced before code
Selected inputs
- Range: prior 20 completed bars.
- ATR: length 14; 0.25 ATR clearance.
- DMI: DI length 14 and smoothing 14.
Questions carried into Design
- Immediate breakout or retest entry?
- Which timezone governs the daily cap?
- Can a position cross the day boundary?
- Should exits be time-based or stop/target only?
03 · Strategy Specification
The latest completed specimen is Version 3
V3 is short-only. It requires a confirmed five-minute close at or below the prior range low minus 0.25 ATR, a prior close at or above the active range low, DI- greater than DI+, a flat strategy, no pending entry, fewer than five counted fills in the UTC day, and no same-bar re-entry after a close. It uses one fixed contract, a 0.75 ATR stop, a 1.5 ATR target, no pyramiding, no time exit, and no forced daily flat.

Product-workflow evidence from the narrated founder demonstration.
04 · Generated artifacts
Three exact Pine files are available for inspection
The downloadable filenames retain BTC, the standard market shorthand for Bitcoin, so the published artifacts and their SHA-256 checksums remain unchanged.
| Version | Intended test | Source | SHA-256 | Download |
|---|---|---|---|---|
| V1 | Long-and-short baseline | BTC_Range_Breakout_v1.pine 160 lines | b7fd68c1fe4602a2714b45e5777c9a5dbb72164b691e5ebd6f2fa27ccffa7673 | Download |
| V2 | Short-only directional test | BTC_Range_Breakout_v2.pine 143 lines | 4d8dc2e30e7e59b72adbf2d57e5bb0574e4b76f25d3eef3d9bd581e3098084d4 | Download |
| V3 | 0.75 ATR initial-stop test | BTC_Range_Breakout_v3.pine 144 lines | 3da09706c28f77d8c895e913a710edfd02e552efe56475526dc622aff769f154 | Download |
Download SHA256SUMS.txt to verify all three files locally.
05 · Exact validation
Automated static checks—not native compilation
Boundary: no Pine compiler was run as part of this publication audit. The demo is consistent with platform acceptance, but the retained evidence does not prove that the local files are byte-identical to the executed scripts.
06 · Backtest assumptions
The material settings belong beside the result
Chart context
CME Bitcoin futures continuous-contract symbol BTC1!
Timeframe
Five-minute bars
Test surface
TradingView Strategy Tester; historical hypothetical simulation
Sizing
One fixed contract; no pyramiding
Range / volatility / direction
Prior 20 completed bars; ATR(14); DMI(14,14)
Baseline exits
1.0 ATR stop and 1.5 ATR target; V3 tests a 0.75 ATR stop
Costs shown
$0 commission and 0 ticks slippage
Daily limit intent
Five filled entries per UTC day; exported-report discrepancy remains unresolved
The video displays gross historical results for V1, V2, and V3. Those figures are used to demonstrate how Evolve compares evidence; they are not independently reproduced performance claims.
07 · Evolve report
The output was a trade-off, not a victory lap
V1 → V2
The displayed short-only sample improved several gross metrics and slightly reduced drawdown, but kept a thin profit factor and zero-cost assumptions.
V2 → V3
The tighter stop modestly reduced drawdown and average loss, while net profit, expected payoff, win rate, Sharpe, and Sortino weakened.
Next controlled test
Audit and enforce the five-filled-entry UTC limit before changing another parameter, then rerun from a common source baseline with nonzero cost sensitivity.
08 · Version diff
The intended experiments were not source-pure
V1 to V2: removed long signals and brackets, but also changed persistent declarations from varip to var and added explicit short-order cancellation. V2 to V3: changed the stop from 1.0 to 0.75 ATR, but changed the declarations back to varip. The displayed performance differences therefore cannot be attributed solely to direction or stop distance.
09 · Known limitations
The missing evidence is part of the proof packet
The raw V1/V2/V3 XLSX exports shown in the demo were not supplied with this publication package, so displayed metrics were not independently recalculated.
No retained native TradingView compile log or platform project identifier cryptographically links the local Pine files to the scripts shown running in the demo.
The intended one-variable refinements were not source-pure: state declarations also changed, and V2 added explicit pending-entry cancellation.
Commission and slippage were zero; profit factors near 1.10 leave a narrow margin for real costs.
No holdout, walk-forward, Monte Carlo, paper-trading, forward-test, or live-trading evidence is included.
A continuous contract can depend on roll, adjustment, session, and data-entitlement settings that are not fully retained here.
Inspect the secondary-platform evidence, then watch the workflow
This is a founder-created educational case study using hypothetical historical results. It is not a customer outcome, signal, recommendation, or promise of future performance. Futures and digital-asset-related trading involve substantial risk.