Pine Script · Python · Strategy validation
Most backtests lie.Mine are built to be able to fail.
I build TradingView strategies in Pine Script and Python backtests that model fills, costs and lookahead bias honestly — then tell you whether your edge is actually there. Including when it isn’t.
- 555
- trades measured
- 8
- forex pairs
- 2
- fill regimes reported
- 6
- parameter settings swept
The problem
Four ways a backtest flatters your strategy
None of these look like bugs. They look like a good equity curve. Each one is checked explicitly in every report I write.
Lookahead bias
A swing high needs bars on both sides before it is confirmed, so it cannot be known on the bar it printed. Backtests that forget this trade on information the chart did not have yet.
Every pivot is only made visible on the bar it would genuinely have been confirmed on.
Fills that never happened
When one bar covers both your stop and your target, OHLC data cannot say which came first. Most engines quietly resolve the tie in the strategy’s favour.
Ambiguous bars are scored as losses. The strategy is never given the benefit of the doubt.
Costs left out
Spread and commission are small per trade and decisive over hundreds. A strategy with a 0.2R edge and a 0.25R cost is a losing strategy that backtests as a winner.
Spread and commission are charged in R at exit, and the assumed cost is stated in the report.
Curve fitting
Tune enough parameters on enough data and something will look profitable. A single flattering setting proves nothing on its own.
The whole plausible parameter range is swept, and every result is reported — not just the best one.
What I do
Three ways to work together
Fixed scope and fixed price, so a small job stays a small job.
Pine Script Build
$150
2–4 days
Your rules, coded as a TradingView indicator or strategy.
What’s included →Strategy Validation Report
$400
5–8 days
A Python backtest of your rules, built to find the ways your edge could be fake rather than the ways it looks good.
What’s included →Full Build & Validate
$900
2–3 weeks
Both of the above, plus the work of turning a discretionary method into testable rules.
What’s included →Proof of work
Dealing Range Theory, measured
A discretionary forex method that traders argued about for years because nobody had tested it. I turned it into precise rules and ran it 555 times.
Both series come from the same trade set. The dashed line assumes the entry bar cannot stop you out; the solid line assumes it can. Reporting only the dashed one would have overstated the result by 8.0R. Hypothetical, cost-adjusted, and not a record of live trading.
+91R
Total R, pessimistic fills
34.6%
Win rate
vs 27.4% breakeven for this payoff mix
+0.164R
Expectancy per trade
8.0R
Cost of the harsher assumption
An 8% haircut, not a collapse
What this does not prove
One market regime. Mid-price data rather than real broker fills. Parameters swept on the same data used to score them. No live forward test yet. This is a hypothesis with good evidence behind it, not a verified edge — and that sentence appears in the case study itself, which is the whole point.
Read the full case studyHow I work
Four steps, no surprises
You send the rules
Entry, stop, target, invalidation. Rough is fine. I tell you which parts are testable and which are still too vague to measure, before any money changes hands.
I write it down as specification
Every rule, every assumption, every edge case — in plain English, agreed with you before I write code. This is where discretionary methods become falsifiable ones.
Build and measure
Pine Script, Python, or both, verified to agree with each other. Then the backtest runs under both optimistic and pessimistic fill assumptions.
The straight answer
Code, a written report, and a section titled “what this does not prove”. If the edge is not there, that is what the report says.
Free, no email required
Is your win rate actually good?
A 35% win rate is excellent at 3:1 and ruinous at 1:1. This calculator puts your win rate next to the one your payoff requires, then tells you whether your sample is even large enough to distinguish the result from luck.
Open the calculatorbreakeven win rate
p* = (1 + cost) / (R + 1)
expectancy per trade
E = p(R − c) − (1 − p)(1 + c)
Two lines of arithmetic that settle most arguments about whether a strategy works.
Product · $49
The Honest Backtest Toolkit
The same Python framework I use on client work: realistic fills, pivots that respect confirmation lag, dual fill regimes, breakeven win rate reported next to the actual one — plus a complete worked example across 8 pairs. For traders who read Python and would rather run it themselves.
See what’s in it- Bar-by-bar engine with realistic fill logic
- No hindsight levels — confirmation lag enforced
- Optimistic and pessimistic regimes side by side
- Parameter sensitivity sweeps built in
- MIT-licensed source, free updates
Questions
The ones worth asking first
Will you make my strategy profitable?
No, and anyone who says they will is selling you something. I build the code and I measure it. Whether the underlying idea has an edge is a property of the idea, not of my implementation. What I can promise is that you will know which one you have.
What if the backtest says my strategy doesn't work?
Then the report says so, in writing, with the specific numbers that show it. That is the entire point of hiring me instead of someone who will hand you a flattering equity curve. Finding out now costs you a few hundred dollars. Finding out live costs considerably more.
What is lookahead bias and why do you keep mentioning it?
It is when a backtest uses information that would not have been available at the moment it places a trade — most commonly a swing high or low that needs several more bars to be confirmed. It is the single most common way a backtest invents an edge that never existed, it is almost invisible in the results, and it is the first thing I check.
Do I get the source code?
Yes. Commented, readable, and yours. Every parameter is exposed as an input so you can keep tuning after I am gone. I do not hold code hostage and I do not obfuscate.
Can you trade my account or tell me what to buy?
No. That is regulated activity in most jurisdictions and I do not do it. I write code and I measure results. Nothing on this site or in any report I write is investment advice.
What do you need from me to start?
Your rules in writing — entry, stop, target, and what invalidates the setup. If you trade discretionarily and cannot yet write them down, that conversion is itself part of the Full Build & Validate package. What I cannot work from is "I'll know it when I see it".
How do payments work?
Fixed price, paid up front through Shopify checkout — card, Shop Pay, Apple Pay or PayPal. You don't need to email me first: after you pay, your order confirmation links to a form that collects your rules, and the work starts from there. Anything larger than the standard scope gets quoted as an invoice before extra money changes hands. Full refund, no argument, if I decide your project isn't a fit or you change your mind before I start.
Find out whether your edge is real
Pick a package and check out in a minute — you send your rules on the form afterwards. Or ask me a question first; that costs nothing either way.