Skip to content
All strategies

Strategies

DOGE Range-Filter Direction Flip with EMA50/200 Alignment, Long-Short, ATR Stop + ATR Trailing Exit, Flat Between Signals (DOGEUSDT.BINANCE 1H, pure OHLCV)

Outcome: Abandoned

DogeRangeFilterEmaFlipLS

Outcome Summary

DogeRangeFilterEmaFlipLS adapted an FMZ/DonovanWall Range Filter plus EMA50/200 continuation idea to DOGE 1H, using ATR-scaled stops and trailing exits. Its first backtest cleared the fee floor (1.03% per trade over 455 trades, +117%), but Sharpe was only 0.41, drawdown was 33.9%, and all the profit came from stressed-volatility periods, so the backtest review sent it to optimization. Optimization raised position size and turnover until impact consumed 97% of gross, PF fell to 1.003 and drawdown reached 61%, and the holdout came in at Sharpe -0.446 on 176 trades. The analyst abandoned it as no_edge after one iteration; pre-registered Variant B (no EMA gate) was never scored, and paired daily-return artifacts in the MTM series were flagged for engine review but not verified.

Hypothesis

Adapted from the FMZ digest article '来自YouTube大神的「神奇的双EMA均线策略」' by 发明者量化-小小梦 (https://www.fmz.com/digest-topic/9670, 2022-10-09). Credit to the author and to DonovanWall's Range Filter (the 'VuManChu Swing Free' indicator). This is NOT a faithful port (lesson L167). The source traded 15m ETH/BTC with a fixed 30-point stop and a 30-point trail. On ETH that is roughly 0.1-0.2% of price, about equal to the 0.10% round trip, so that version is fee-dead by construction. The FMZ backtest covered only 9 months of 2022……Show moreShow less

Adapted from the FMZ digest article '来自YouTube大神的「神奇的双EMA均线策略」' by 发明者量化-小小梦 (https://www.fmz.com/digest-topic/9670, 2022-10-09). Credit to the author and to DonovanWall's Range Filter (the 'VuManChu Swing Free' indicator). This is NOT a faithful port (lesson L167). The source traded 15m ETH/BTC with a fixed 30-point stop and a 30-point trail. On ETH that is roughly 0.1-0.2% of price, about equal to the 0.10% round trip, so that version is fee-dead by construction. The FMZ backtest covered only 9 months of 2022 and is treated as unverified. MECHANISM, restated from first principles: the Range Filter is a volatility-adaptive step filter. It moves only when close escapes a band of 3.5x a doubly-smoothed average absolute bar change, so its direction flips only after a move that is large relative to recent noise. The source's entry fires on the FIRST bar of a new filter direction (longCondition/shortCondition = the CondIni state flip), and only when (a) EMA50 and EMA200 are aligned the same way, (b) the bar body agrees (close>open for longs, close<open for shorts) and (c) close is on the trend side of EMA50. That is a continuation entry: a noise-adjusted breakout taken only in the direction of the slower trend. Economic agent: late trend-followers and stop-outs that extend a move once it escapes the recent noise band (slow diffusion of trend information). ADAPTATIONS: (1) 1H bars instead of 15m, so each trade's typical move is a multiple of the round trip. (2) Stops and trails are expressed in ATR, not in fixed points, so they scale across price levels and years. (3) The instrument is DOGEUSDT.BINANCE, not BTC or ETH. BTC is ~44-62% of the corpus and ETH has 8+ live pipeline entries. DOGE is a liquid USD-M perp with history from mid-2020 (~6 years of 1H, ~53k bars) and 1H ATR of ~0.9-1.3%, which gives the gross move the fee floor needs. It is Binance rather than Hyperliquid because the mechanism is pure OHLCV (lesson L168). (4) Shorts are allowed, as in the source, so this is USD-M futures at 1x leverage. There is an explicit FLAT state: after an exit, the strategy stays flat until the NEXT filter flip that passes all filters. Expected time in market is ~30-40%, flat ~60-70% (lesson L150). SELECTION DISCLOSURE (lesson L122): the choices made after seeing factory history are the symbol (DOGE, chosen for its vol-to-fee ratio and low corpus share), the timeframe (1H, the smallest bar where the arithmetic clears 3x RT) and the ATR stop/trail multiples. The Range Filter (20, 3.5) and EMA (50, 200) parameters are the source's defaults and are frozen, not tuned. PRE-REGISTERED VARIANT (lesson L130): variant B is the same entry without the EMA50/200 alignment and close-vs-EMA50 conditions (filter flip + candle colour only). It is scored separately. If B matches or beats A, the EMA gate is not adding value and that is reported.

Implements the hypothesis's variant A: frozen source parameters RF(20,3.5) and EMA(50,200), adapted to 1H, with ATR-scaled stop and trail. Variant B is the same code with use_ema_gate=false and should be scored as a separate run. The entry-ATR, side, entry price and best close are scalar attributes anchored at entry, so they persist across restarts. Leverage is 1.0; futures because the strategy shorts.

Failure code: no_edge, taken from the first measured report (per L159). The first report showed Sharpe 0.41 with a CI of -0.36 to 1.17 that straddles 0, PF 1.16, and drawdown 33.9% against the pre-registered 25%. 2023 and 2026 lost money, and profit came only from the stressed-vol tercile. This is NOT fee_edge: avg_trade_return_pct was 1.03% on the first report and 0.49% after optimization, against the 0.15% Binance USD-M single-leg floor. It is not beta either (beta 0.04, correlation 0.41). The optimization then……Show moreShow less

Failure code: no_edge, taken from the first measured report (per L159). The first report showed Sharpe 0.41 with a CI of -0.36 to 1.17 that straddles 0, PF 1.16, and drawdown 33.9% against the pre-registered 25%. 2023 and 2026 lost money, and profit came only from the stressed-vol tercile. This is NOT fee_edge: avg_trade_return_pct was 1.03% on the first report and 0.49% after optimization, against the 0.15% Binance USD-M single-leg floor. It is not beta either (beta 0.04, correlation 0.41). The optimization then failed the HARD holdout: Sharpe -0.446 on 176 unseen trades over 444 days, which is an adequate sample and a measured negative forward result. Selecting parameters pushed size and turnover up (avg position 49% to 87%, trades 455 to 833). Modeled impact then consumed 97% of gross, PF fell to 1.003, drawdown reached 61%, and equity went to -100% by 2026-04. The pre-registered prediction met 3 of 6 checks. The QA edge concern was not raised here. The Range-Filter-flip plus EMA50/200 continuation on DOGE 1H does not hold out of sample. It joins the earlier DOGE trend/breakout deaths (4H triple-filter no_edge, 15m compression breakout overfit). Re-optimizing the same mechanism is not an admissible iterate (L126). Variant B (no EMA gate) was not scored, so it gives no evidence either way. Separately, and not verified: the optimized MTM daily series has recurring paired -X/+X days (up to -92%/+1175%) that disagree with realized PnL and inflate the reported Sharpe and DSR. It should go to engine review.

Implementation

DOGEUSDT USD-M perp, 1H. DonovanWall Range Filter (EMA(|dClose|,20) smoothed by EMA(39) x3.5) with incremental state. Enters only on the first bar the filter direction flips (CondIni state change), when the candle body agrees and, if use_ema_gate, EMA50/EMA200 are aligned and close is on the trend side of EMA50. Long and short. Exits at bar close on an initial stop of 2x entry-ATR or a trailing stop of 3x entry-ATR from the best close since entry, whichever is tighter. After exit it stays flat until the next qualifying flip. Size: 1% equity risk over the 2-ATR stop, capped at 1x equity notional. The signal is (close - filter)/ATR, which is continuous.

Verification Results

Optional: return a smaller min_bars_required (e.g. 2) and gate should_enter on an internal self._n >= ema_slow + 2*rf_period counter, so the EMAs warm on every bar.

Indicator state only starts updating once the base template has buffered min_bars_required() = 210 bars. calculate_signal() is not called below that count. EMA200 is therefore seeded at the close of bar ~210 and needs a few hundred more bars to converge, so for roughly the first 200-400 bars the EMA50/200 alignment gate runs on a biased EMA200. This is negligible over the ~53k-bar full history, but it may matter in short walk-forward windows.

Optional: set the entry anchors in on_position_opened, or re-anchor from avg_px_open on the first should_exit bar.

should_enter() writes position state (_pos_side, _entry_price, _entry_atr, _best_close) before the order is sized or filled. If the order is then dropped (size 0 or under the $5 min notional), the state is stale. This is harmless as coded: should_exit only runs when a position exists, and every new entry overwrites the state. Entry price is taken as the bar close rather than avg_px_open, which is consistent with the zero-latency backtest fill.

Make sure the full backtest folds funding, and have the analyst report the short-side PnL net of funding.

The strategy holds short USD-M perp positions (111 of 174 sandbox trades) for about 1.2 days on average, but funding payments are not in the sandbox PnL (funding_folded=false). A long-short book on DOGE pays or receives funding on every 8h stamp while held.

The sandbox (834 days, 174 trades) shows PF 1.18 and Sharpe 0.34 with a CI from -0.94 to 1.58. All of the return comes from the stressed-vol tercile (+42%). The calm tercile loses 9.3% and the normal tercile is flat, so the edge looks like a crash/trend-regime effect rather than a broad one. 111 of the 174 trades are shorts, and funding is NOT folded into PnL (funding_folded=false, 0 events), so the short-side economics are unmeasured. The analyst should check the result net of funding, check variant B (use_ema_gate=false) against A as pre-registered, and check how concentrated the result is in the top few stress-window trades. Impact is 21% of gross, which is acceptable.

Backtest Review

Sharpe
0.41
Total return
117.17%
Max drawdown
33.85%
Trades
455
Win rate
37.1%
Profit factor
1.16

455 trades over 6.1 years is enough to measure. Per-trade return is 1.03% of notional, about 7x the 0.15% floor for Binance USD-M futures. Commissions are 4.9% of gross.

The trade records add up: summed trade PnL is +$117.2k, which matches total_return +117.2%, and end_unrealized is 0. Funding is now included (-$6.1k across all trades), so QA's point that funding was not measured is resolved.

This is not market beta. Beta is 0.04 and correlation 0.41, and the book trades both sides (198 longs, 257 shorts). The payoff looks like trend following: 37% of trades win, and the average win is about 1.97x the average loss.

Profitable in 5 of 7 calendar years (2020 and 2026 are partial years) and positive in all 7 named stress windows. The strategy is in the market 30% of the time, as the hypothesis predicted.

The trades match the stated mechanism: entries come on range-filter flips in the direction of the EMA trend, exits use ATR stops and trailing stops, and the book is flat between signals.

The edge is thin and depends on a few big trades. PF is 1.16, Sharpe 0.41 (95% CI -0.36 to 1.17) and PSR 0.76. Without the top 5 trades, PnL falls to +$11k. Without the top 10, it is -$71k.

QA's regime concern is confirmed. All of the return comes from the highest-volatility third of days (+173%). The calm third (-32%) and the normal third (-14%) both lose money, and 2023 lost $57k.

Shorts roughly break even after funding: +$13k across 257 trades. Longs make most of the money (+$104k).

Max drawdown is 33.9% and took 873 days to recover. That is well above the 20% default limit for futures.

Possible harness bug in daily_returns, not verified: several pairs of days swing about -20% then +25% while the strategy risks only 1% per trade (for example 2024-04-27/28), and the final bar shows an unpaired -27.96%. The equity curve in the detail file shows no such moves and ends at $217.2k, which matches the trade records. Sharpe, VaR and CVaR are computed from the daily_returns series, so they are unreliable until this is checked.

Variant B (without the EMA gate), which the hypothesis committed to scoring, has not been run.

Analysis

Per-trade gross move clears the fee floor. First report avg_trade_return_pct is 1.03%, optimized is 0.49%, against the 0.15% floor (0.20% at 2x) for Binance USD-M. Fees are not the cause of failure.

The sample is large: 455 trades on the first report, 833 after optimization, and 176 in the holdout.

No sensitivity cliffs. PBO is 0.35, the walk-forward is not flagged overfit, and DSR is 0.96.

This is not beta. Beta is 0.04-0.05 and benchmark correlation is 0.3-0.4, so the long/short book does not simply track DOGE.

HARD failure: the holdout Sharpe is -0.446 on 176 trades over 444 unseen days (2025-05-24 to 2026-08-11). That sample is adequate, so the negative is a measured result, not a thin one.

The first measured report was already marginal. Sharpe was 0.41 with a bootstrap CI of -0.36 to 1.17 (straddles 0), PSR 0.76, PF 1.16, and max drawdown 33.9% against the pre-registered 25%. 2023 lost 25% and 2026 YTD lost 31%. The drawdown took 873 days to recover.

Optimization lowered rf_mult (3.5 to 2.35) and trail_atr_mult (3.0 to 1.93), and raised risk_pct. That nearly doubled turnover and pushed average position from 49% to 87% of equity. Modeled impact rose to 97% of gross PnL, realized PF fell to 1.003 and drawdown reached 61%. The equity curve goes to -100% in April 2026.

Profit sits only in the stressed-vol tercile (+173% on the first report). The calm tercile lost 32% and the normal tercile lost 14%.

The pre-registered prediction met 3 of 6 checks. It missed OOS Sharpe (0.59 vs 0.7), drawdown (61% vs 25%) and PF (1.00 vs 1.2).

The optimized 'Sharpe 0.81 / DSR 0.96' comes from an MTM daily series with recurring paired -X/+X days, for example -85%/+572% on 2023-11-10/11, -92%/+1175% on 2024-06-06/07 and -92%/+1158% on 2026-04-13/14. The same shape appears at smaller scale on the first report, including a -27.96% final bar on 2026-08-12. These days are not consistent with realized PnL (PF 1.003). I suspect a marking artifact but have not verified the mechanism, so this should go to engine review. The significance statistics built on that series should not be trusted.

not kept

kept

Outcome Summary

Clearing the fee floor per trade is not enough: an edge that earns only in the high-volatility regime and lets optimization push position size and turnover up (average position 49% to 87%, impact at 97% of gross) will fail out of sample, and re-optimizing the same DOGE trend/breakout mechanism is not an admissible iterate.

The analyst abandoned it with failure code no_edge after it failed the HARD holdout gate (Sharpe -0.446 on 176 unseen trades). The first report was already marginal (Sharpe CI straddling 0, drawdown above the pre-registered 25%, losses in 2023 and 2026), only 3 of 6 pre-registered checks were met, and the candidate did not survive programme FDR.

A long/short continuation strategy on DOGEUSDT.BINANCE 1H that enters on the first bar of a DonovanWall Range Filter direction flip, only when EMA50/200 alignment, candle colour and close-vs-EMA50 all agree, and exits on an ATR stop or ATR trailing stop, staying flat between signals.

The first backtest (2020-07 to 2026-08, 455 trades) returned +117.2% with Sharpe 0.41 (95% CI -0.36 to 1.17), PF 1.16, 1.03% average per-trade return and 33.9% max drawdown, with all profit coming from the stressed-volatility tercile. After optimization (833 trades) walk-forward OOS Sharpe was 0.59 and PBO 0.35, but PF fell to 1.003, drawdown reached 61%, modeled impact took 97% of gross PnL, and the holdout Sharpe was -0.446 on 176 trades over 444 days.

Analysis

来自YouTube大神的「神奇的双EMA均线策略」

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