Open Harmonics · Experiments

Not supported · Timeframes · 2026-09-04

First Python backtest: how good are harmonic setups on 1h/4h/1d/1W?

What this means

The first Python backtest showed 51-70% win rates and +0.5 to +1.1R per trade, two to five times what the same strategy earns on TradingView's bar-by-bar fills (+0.19 to +0.27R). The code finds pivots with a centred window that uses bars after Point D, and it enters the bar after D, before D could have been confirmed in real time. That look-ahead is the likely reason for the inflated numbers, though the two tests also differ in data and exits, so its exact share is not measured. None of these figures should be relied on.

The explanation is our best reading; the data shows the result but not the cause directly.

By timeframe

TimeframeVerdictnResult
15-minuteNot tested: look-ahead Python sim on yfinance (no 15m history there); superseded by the TradingView sweeps, not worth reproducing
1-hourNot supported1,360+0.52R closed trades vs +0.19R on TradingView
4-hourNot supported524+0.83R vs +0.23R on TradingView
DailyNot supported361+0.86R vs +0.27R on TradingView
Hypothesis
A Python replica of the Pine logic shows strong win rates on every timeframe.
Method
Own Python sim on yfinance data, 133 tickers, 1H/4H/1D/1W; zigzag = centred rolling window (length 15); entry at close of D+1; SL min(D,X)x0.99, single TP2 2R.
Result
Closed trades: 1H n=1,360, 50.7% win, mean +0.52R; 4H n=524, 60.9%, +0.83R; 1D n=361, 62.0%, +0.86R; 1W n=112, 69.6%, +1.09R. (Open trades carry absurd R values, up to +1,283R, so all-trade means are meaningless.) The same strategy on TradingView fills earns +0.19 to +0.27R.
How much to trust it
Low: look-ahead: centred zigzag knows D is the swing low, and entry at D+1 is before D could be confirmed
Did it change the live rule?
No.
Notes
A clean illustration of look-ahead inflation: 2-5x the real edge.

Scripts and data for this study will be linked here when the research code is published on GitHub.

← All experiments

Education and research only. Not financial advice. Backtests use today's index members (survivorship bias).