Skip to content
All strategies

Strategies

Faithful port of ChaoZhang's FMZ 'TURTLE STRATEGY' (Pine v5): System-1/System-2 Donchian stop-entries with a skip-after-winner switch, ATR stop, ATR pyramiding, on DOGEUSDT.OKX 3H (aggregated from 1H)

Outcome: Abandoned

TurtleFmzDogeOkx3H

Outcome Summary

This run ported ChaoZhang's two-system Turtle Donchian breakout from FMZ to DOGEUSDT.OKX on internally aggregated 3H bars, keeping the source's default inputs and constants. Across 2 iterations, the full-history backtest produced +166% over 843 trades but a Sharpe of only 0.55, an average trade return of 0.145% (below the 0.15% floor), and an 88% drawdown, and five outlier trades accounted for all of the profit. The analyst abandoned it at backtest review before optimization, citing no edge after costs and a structural drawdown the tunables could not fix. The rejection covers only this DOGE/OKX 3H setup; the author's BTC configuration and Turtle breakouts in general were not tested.

Hypothesis

Faithful port of ChaoZhang's open-source FMZ Pine strategy 'TURTLE STRATEGY' (https://www.fmz.com/strategy/443140), credit to the author. The FMZ page text says the strategy uses 'double moving averages', but the code has no moving averages. It runs a two-system Turtle Donchian breakout, and this port follows the CODE. All default inputs are kept: risk 1% of capital, ATR(20), Stop ATR 1.5, Pyramid Profit 0.5 ATR, S1 long 20 / S2 long 55, S1 long exit 10 / S2 long exit 20, S1 short 15 / S2 short 55, S1 short exit……Show moreShow less

Faithful port of ChaoZhang's open-source FMZ Pine strategy 'TURTLE STRATEGY' (https://www.fmz.com/strategy/443140), credit to the author. The FMZ page text says the strategy uses 'double moving averages', but the code has no moving averages. It runs a two-system Turtle Donchian breakout, and this port follows the CODE. All default inputs are kept: risk 1% of capital, ATR(20), Stop ATR 1.5, Pyramid Profit 0.5 ATR, S1 long 20 / S2 long 55, S1 long exit 10 / S2 long exit 20, S1 short 15 / S2 short 55, S1 short exit 7 / S2 short exit 20. The hard-coded constants also stay: 0.0018 commission factor, 10% stop cap, at most 5 entries in one direction (pyramiding=5), margin 100%, so leverage 1. What the figure shows: the author's FMZ backtest on Futures_Binance BTC_USDT swap, 3h bars, 2024-01-29 to 2024-02-28, initial 50,000 USDT. It plots the 20/55-bar high and low bands and the blue-dot exit-signal line, with long/short/'Pyramid Long'/'Pyramid Short'/close markers. The equity panel reports a 13.7% profit, Sharpe 0.132 and max drawdown 10.1% over 29 trades. That is one month on one instrument. The claim is unverified and not used here. Platform adaptations (all named): (1) Instrument/venue: DOGEUSDT.OKX USDT perpetual instead of BTC_USDT on Binance futures. BTC and Binance USD-M are heavily over-represented in the corpus (BINANCE 54% of experiments), and OKX is under its 5% quota (2.9%). OKX DOGE 1H history starts 2020-07, close to the author's 2020-01-01 backtest start. Futures are needed because the strategy shorts. Real OKX fees apply (0.02% maker / 0.05% taker), not the source's 0.18%. The literal 0.0018 factor stays inside the formulas, as in the source. (2) Timeframe: the author used 3h bars. Our catalog has no 3-hour bars, so the strategy subscribes to DOGEUSDT.OKX-1-HOUR bars and builds 3H bars internally. Each 3H bar aggregates three 1H bars at UTC epoch-aligned boundaries 00/03/06/.../21. All indicator and decision logic runs once per completed 3H bar. Resting stop orders sit on the venue and trigger intrabar on every 1H bar. (3) Capital: Pine sets strategy.initial_capital = 50000. We use the engine's 100,000 USDT starting equity as `initial_capital` in the account formula. The formula is scale-invariant. (4) Execution substitutions: Pine `strategy.order(..., stop=X)` entry orders and `strategy.exit(stop=X)` exits become stop-market orders resting at X. They trigger intrabar in the platform's simulated venue (intrabar_stop is supported). If X has already been crossed at placement, the order fills at market. Pine's `strategy.entry` pyramid adds fill at the next bar's open. On this 24/7 venue that becomes a market order at the 3H signal bar's close (next_bar_open_fill → use_equivalent). Accounts are NETTING, matching Pine's single net position. Sizing, the skip mechanism, stops and pyramiding follow the code line for line.

negative_expectancy: The faithful port of ChaoZhang's FMZ TURTLE STRATEGY on DOGEUSDT.OKX 3H (aggregated from 1H) has no edge after costs on a reliable 843-trade sample. Fee-floor check: avg_trade_return_pct is 0.145% reported and 0.129% dollar-weighted, against the +0.15% OKX floor. PF is 1.067. Modelled impact takes 58% of gross. Five trades produce the entire profit, and the other 838 lose $422k. Drawdown is 88% against the pre-registered 30% limit, which the contract-fixed sizing (1% risk/ATR capped at full account, average position 83% of equity) makes structural and outside what the tunables can change. Against DOGE buy-and-hold (+2,480%, 90% drawdown) the information ratio is -0.62. QA's smoke-test concern (0.12% per trade, 46% drawdown) holds on the full history. Scope: this rejects only this DOGE/OKX 3H operationalization with the source's default inputs. It does not reject Turtle two-system breakouts in general or the author's BTC configuration, which was not tested here.

Implementation

ChaoZhang Turtle port on DOGEUSDT.OKX: S1/S2 Donchian stop entries, skip-after-winner, ATR stops and pyramiding. Only complete epoch-aligned three-hour aggregates of consecutive hourly bars drive decisions; stops match intrabar on hourly bars. Pyramid market orders fill at the signal close as the continuous-market next-open equivalent.

Minimal QA corrections preserve the passing signal and order logic: individual entry lots are tracked through partial fills, FIFO reductions and reversals; first_entry and entries_count derive from surviving lots. A scalar encoded ledger preserves state across restarts. Partial initial or gapped 3H buckets are discarded. Sandbox return and drawdown concerns remain advisory for full-history analysis; they do not justify changing this frozen source port.

Verification Results

Sandbox average net trade return is 0.1193%, with 46.52% drawdown. Full-history analysis should assess robustness, trading costs and the registered drawdown criterion; these smoke-test results do not establish a correctness defect.

Backtest Review

Sharpe
0.55
Total return
166.48%
Max drawdown
88.05%
Trades
843
Win rate
26.5%
Profit factor
1.07

The trades implement the stated mechanism: two-system Donchian stop entries in both directions (360 long / 483 short) with ATR stops and pyramid adds. The accounting reconciles, the input audit is clean and there is no end-of-backtest unrealized gain (end_unrealized_pct 0).

The sample is large: 843 closed positions over about 6.2 years of DOGEUSDT.OKX history.

Fee-floor comparison: the reported avg_trade_return_pct is 0.145% and the dollar-weighted figure is 0.129% (PnL $166k on $129M entry notional). Both are below the +0.15% OKX futures floor. PF is 1.067 and 26% of trades win.

The headline depends on a few trades. The top 5 winners make $588k; without them the other 838 trades lose $422k. The return series has skew 7.96 and kurtosis 147.

Modelled impact is 57.9% of gross PnL (capacity about $298k). With commissions of $130k, execution costs take most of the gross edge.

Max drawdown is 88.1% (CI 63-99%) against the contract's pre-registered 30% constraint. The drawdown lasted 1,160 days, 2023 lost 77%, there were 23 losses in a row, and the calm-volatility tercile lost 92%.

Benchmark: DOGE buy-and-hold over the same window returned about +2,480% with a 90% drawdown. The strategy returned +166% with an 88% drawdown, about 0.98x the underlying's drawdown, and has information ratio -0.62. Sharpe is 0.55 with a CI of -0.21 to 1.20, and executed-signal IC is 0.044 (t=1.89, rejected_no_information).

Average position is 83% of equity at 1x. The faithful '1% risk / ATR' unit usually hits the 'unit*price > account' cap on DOGE 3H. That sizing comes from the fixed percentage_to_risk and the hard-coded cap, so the three tunables (atr_period, stop_N_multiplier, pyramid_profit) cannot bring the drawdown near 30%.

Iteration History

Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] Sandbox average net trade return is 0.1192% with 46.45% drawdown. These are advisory concerns for full-history analysis, not grounds for this failure. - [critical] first_entry is updated only when the net position becomes flat, opens, or reverses. An opposing resting entry can reduce the position and fully consume its oldest entry while leaving later entries open. Pine's strategy.opentrades.entry_id(0) then identifies the oldest……Show moreShow less

Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] Sandbox average net trade return is 0.1192% with 46.45% drawdown. These are advisory concerns for full-history analysis, not grounds for this failure. - [critical] first_entry is updated only when the net position becomes flat, opens, or reverses. An opposing resting entry can reduce the position and fully consume its oldest entry while leaving later entries open. Pine's strategy.opentrades.entry_id(0) then identifies the oldest surviving entry, but this port retains the consumed entry's ID. The exit-channel selection can consequently differ from the source. entries_count also remains unchanged after such reductions, potentially blocking pyramid entries incorrectly. (line 273) — fix: Track individual open entry lots and their IDs through fills and reductions using the source's trade-allocation semantics. Derive first_entry and entries_count from the surviving lots rather than net-position transitions. - [warning] The aggregator finalizes an incomplete bucket when a gap moves into another bucket, and accepts a partial initial bucket. It does not verify that each 3H bar contains three consecutive 1H bars. These shortened bars affect ATR, Donchian channels, and decisions despite the specification requiring completed three-hour aggregates. (line 149) — fix: Track constituent timestamps and accept only three consecutive hourly bars ending at the aligned boundary. Discard incomplete buckets and resume at the next complete bucket.

Track individual open entry lots and their IDs through fills and reductions using the source's trade-allocation semantics. Derive first_entry and entries_count from the surviving lots rather than net-position transitions.

first_entry is updated only when the net position becomes flat, opens, or reverses. An opposing resting entry can reduce the position and fully consume its oldest entry while leaving later entries open. Pine's strategy.opentrades.entry_id(0) then identifies the oldest surviving entry, but this port retains the consumed entry's ID. The exit-channel selection can consequently differ from the source. entries_count also remains unchanged after such reductions, potentially blocking pyramid entries incorrectly.

Track constituent timestamps and accept only three consecutive hourly bars ending at the aligned boundary. Discard incomplete buckets and resume at the next complete bucket.

The aggregator finalizes an incomplete bucket when a gap moves into another bucket, and accepts a partial initial bucket. It does not verify that each 3H bar contains three consecutive 1H bars. These shortened bars affect ATR, Donchian channels, and decisions despite the specification requiring completed three-hour aggregates.

Outcome Summary

A faithful '1% risk / ATR' Turtle unit capped at the full account puts a volatile coin like DOGE at roughly full-equity exposure, so sizing has to be part of the tested design rather than fixed by the contract if drawdown limits are to be met.

The analyst abandoned it at the backtest-review gate for negative expectancy: average trade return was below the +0.15% OKX futures fee floor, modelled impact took 58% of gross PnL, the top 5 trades made the entire profit (the other 838 lost $422k), and the 88% drawdown far exceeded the pre-registered 30% limit. The fixed sizing (1% risk/ATR capped at full account, average position 83% of equity) made that drawdown structural and beyond what the tunables could fix.

A faithful port of ChaoZhang's FMZ 'TURTLE STRATEGY': a two-system Turtle Donchian breakout (S1 20/15, S2 55/55) with stop entries, a skip-after-winner switch, a 1.5-ATR stop capped at 10%, and 0.5-ATR pyramiding up to 5 entries, run on DOGEUSDT.OKX 3H bars aggregated from 1H at 1x leverage.

Over about 6.2 years (2020-07 to 2026-10) and 843 closed trades it returned +166.5% with Sharpe 0.55 (CI -0.21 to 1.20), profit factor 1.067, a 26% win rate and a max drawdown of 88.1%. Average trade return was 0.145% of notional (0.129% dollar-weighted), against DOGE buy-and-hold at about +2,480% with an information ratio of -0.62.

Analysis

游龟交易策略|Turtle Trend Strategy

Analysis

Turtle Trend Strategy

Backtest and paper results are hypothetical. Trading involves risk of loss.