Skip to content
All strategies

Strategies

DOT OKX Howtrader DoubleMaStrategy — Frozen 10/20 Strict SMA Crossover

Outcome: Abandoned

DotOkxHowtraderDoubleMa

Outcome Summary

After one iteration, DotOkxHowtraderDoubleMa tested a frozen 10/20 SMA crossover adaptation on DOT/OKX with persistent limit orders and reversal exits. The backtest reported -100% return and Sharpe -7.34, while 985 inspected pre-liquidation trades independently demonstrated severe losses. Backtest review abandoned the adaptation for negative expectancy, with no authorized parameter search available. Later stages were not reached, and execution, reporting and dependency questions remained unresolved.

Hypothesis

Faithful translation of DoubleMaStrategy by 用Python的交易者, MIT licensed, from the supplied howtrader source at commit fcad8e2d86825506b9d33441ab78be853c2c3bdd. Preserve fast_window=10, slow_window=20, strict crossing comparisons, close-priced limit orders, and opposite-cross reversal without additional filters, stops, targets or time exits. Use DOTUSDT.OKX linear perpetuals and one-minute bars for the source's unaggregated BarGenerator convention. Replace the source's Decimal(1) trading lot with an equity-relative……Show moreShow less

Faithful translation of DoubleMaStrategy by 用Python的交易者, MIT licensed, from the supplied howtrader source at commit fcad8e2d86825506b9d33441ab78be853c2c3bdd. Preserve fast_window=10, slow_window=20, strict crossing comparisons, close-priced limit orders, and opposite-cross reversal without additional filters, stops, targets or time exits. Use DOTUSDT.OKX linear perpetuals and one-minute bars for the source's unaggregated BarGenerator convention. Replace the source's Decimal(1) trading lot with an equity-relative research lot. Preserve pending orders: the supplied strategy never calls cancel_all. Order and stop-order callbacks perform no trading action; trade callbacks only publish state. Initialization requests 10 days of historical bars, updates the rolling array and waits for ArrayManager initialization; historical initialization must not submit executable orders. The supplied file omits the implementations of ArrayManager, BarGenerator and CtaTemplate. Attempts to retrieve those pinned helper files failed, so the conventional 100-bar array initialization, one-minute generator interval and default limit-order semantics remain dependency assumptions that the developer must verify before claiming a line-for-line reproduction. No performance study has been performed.

This is an explicitly requested replication, so the failed LTC Hyperliquid crossover and fee-sensitive fast strategies inform caution without changing or rejecting the submitted rules. DOT on OKX avoids the exact failed LTC/HYPERLIQUID/4H framing, increases an underrepresented venue bucket and retains both directions. It does not establish mechanism novelty or rescue the signal economically. Corpus concentration is empty, so DOT's historical share cannot be verified. Single-symbol and same-venue scope are retained because adding a basket or hedge would change the source strategy.

negative_expectancy: decline optimization of this frozen DOT/OKX adaptation. The inspected pre-liquidation sample demonstrates severe losses under modeled costs, independently of later reporting inconsistencies. This rejects the tested adaptation, not the source author's strategy or SMA crossovers generally. Review impact calibration, post-liquidation execution and dependency assumptions separately before claiming faithful reproduction.

Implementation

Stratmill translation of howtrader's DoubleMaStrategy on DOTUSDT.OKX 1-minute bars. It computes SMA(10) and SMA(20) of closes after a 100-bar ArrayManager warm-up. A strict cross_over (fast>slow now, fast<slow on the previous bar) buys one lot with a limit at the bar close when flat. If short, it buys two lots at that limit (cover + buy). A strict cross_below mirrors this: it shorts when flat and sells two lots when long. There are no filters, stops, targets or time exits, and orders are never canceled.

Line-for-line port of the source's on_bar: same indicator (simple MA of close), same defaults (10/20), same strict > / < crossing tests on [-1]/[-2] values, and the same branch table. pos==0 enters in the cross direction, opposite pos reverses with two lots, and same-side pos does nothing. All orders are GTC limits priced at the bar close, never canceled. The research lot replaces Decimal(1). It is 10% of account equity at the first trade's close price, frozen thereafter as a constant like the source's lot, at leverage 1. Calculate_signal returns fast_ma0 - slow_ma0 as a continuous value, and the crossing booleans drive the order decision. Faithful port. The Analyst should note that a 1-minute 10/20 SMA cross pays roughly 0.10% taker round trip per reversal, so fee drag is likely to dominate.

Verification Results

Acceptable as a faithful constant lot. Consider documenting the price-drift exposure, or confirming with the Research Lead that 'equity-relative' means frozen at the first trade rather than re-derived per entry. Watch the full backtest for margin-rejected flip orders.

The research lot is frozen in DOT units at the first trade: 10% of equity divided by that bar's close. This mirrors the source's constant Decimal(1). But over 2020-2026, DOT's price has moved about 10x in both directions. At leverage 1.0, a lot set near $5 becomes about 110% of equity at $55. The 2-lot reversal order is then about 220% of equity and may be margin-rejected. If equity falls, the lot stays the same and exposure as a share of equity grows.

Add it to port_deviations as a platform constraint: one working order at a time under the base processing loop.

The source never cancels orders and keeps running on_bar while a limit is pending, so it can stack several pending orders. The base template's _process_primary returns early whenever a non-protective order is open, so the port submits nothing new while a close-priced limit rests. In the backtest and paper engines, close-priced limits on bar data fill on the decision bar, so this rarely matters. It is still an undisclosed difference wherever a limit rests.

No change required. Keep the override documented as intentional.

_submit_entry and _submit_exit override the base helpers, replacing the reduce-only market close with a 2-lot GTC limit that flips the position. This is deliberate: it reproduces cover+buy and sell+short at one price in a NETTING account. It also skips the base _close_pending and cancel_all_orders guards. That matches the source, which has no cancel_all.

A strict 10/20 SMA cross on 1-minute DOT bars reverses often. Each reversal pays about 0.10% taker round trip, plus modelled impact. The sandbox impact was $9,578 on $1.57M traded, about 0.6% per traded notional on OKX DOT at 1m, which is far larger than any plausible 1-minute cross edge. The sandbox lost on all 77 closed positions: -11.4% over 5 days, -1.43% average per trade. This is expected to be cost-dominated. Before reading the backtest, reconcile the ledger: avg_holding_bars is 0.0 while the average holding period is 1h12m, and the largest loss is -$5,532 on a lot of about 10% of equity. Netting flips done with one 2-lot order may merge positions in the report. Also weigh the impact model's size at 1m against this venue's depth.

Backtest Review

Sharpe
-7.34
Total return
-100.00%
Max drawdown
100.00%
Trades
7302
Win rate
4.1%
Profit factor
0.05

Inspected trades show both directions, reversal-linked exits and a constant 1,819-DOT research lot, consistent with the implemented crossover structure.

Before reported liquidation, 985 closed trades lost $99,979.77, with profit factor 0.0436 and mean trade return -1.309%. Negative expectancy is already substantial before post-liquidation reporting complications.

Full-report average trade return is -1.138%, versus the supplied approximately 0.10% round-trip cost reference. QA's economic concern is borne out under the modeled execution costs.

The contract freezes both SMA windows and sizing and provides no tunable parameters; optimization has no authorized search space.

Trades continue after reported liquidation, holding-bar statistics are inconsistent, and pinned helper semantics remain unverified. These require separate review; their causes are not established.

The sampled full-window buy-and-hold curve returned -80.37% with approximately 98.57% drawdown. The strategy exhausted its account much earlier.

Outcome Summary

Review impact calibration, post-liquidation execution and unverified helper semantics before claiming faithful reproduction; the rejection applies to this tested adaptation.

Backtest review returned abandon because severe negative expectancy was evident before the reporting complications, and frozen parameters left no authorized optimization search space. Optimization, post-optimization analysis and risk review were not reached.

Translate Howtrader's frozen strict SMA(10/20) crossover to DOTUSDT.OKX one-minute perpetual bars, preserving uncanceled close-priced limit orders and opposite-cross reversals with an equity-relative research lot.

The full report recorded -100% return, Sharpe -7.34, 7,302 closed trades and liquidation, with unresolved post-liquidation reporting inconsistencies. The inspected pre-liquidation sample independently showed 985 closed trades losing $99,979.77, profit factor 0.0436 and mean trade return -1.309%.

Analysis

DoubleMaStrategy

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