Skip to content
All strategies

Strategies

FMZ SuperTrend 45/3: BTC OKX 15m Long-Short Source Port

Outcome: Abandoned

BtcOkxFmzSuperTrend453

Outcome Summary

BtcOkxFmzSuperTrend453 ported the source's fixed 45/3 SuperTrend flip mechanism to BTC OKX perpetual trading with market execution and equity-relative sizing. Trade records supported the intended alternating close-before-reopen behavior, but 5,431 closed trades produced negative net expectancy and a reported -100% return. Backtest review abandoned the strategy before optimization because losses were already substantial before reported liquidation and no verified repair supported iteration. Reporting inconsistencies were left for separate investigation.

Hypothesis

Port of 发明者量化-小小梦’s JavaScript版本SuperTrend策略: trade completed-bar SuperTrend direction changes using the article’s trading defaults, ATR period 45 and multiplier 3, on 15-minute bars. The demonstration’s 10/3 settings are not the trading defaults. Preserve the source’s indicator recursion and close-before-reopen behavior. Adapt the historical OKEX BTC quarterly contract to BTCUSDT.OKX, the platform-supported linear perpetual on the same venue; this tests the signal mechanism, not quarterly-contract economics. Replace repeatedly submitted two-tick marketable limits with taker market orders at the signal bar’s close, an execution approximation that does not reproduce FMZ polling or partial fills. Replace one-contract sizing with equity-relative sizing. No extra trend filter, profit target, intrabar stop or time exit is introduced. Source performance claims remain unverified.

This seed contains one concrete mechanism, so it warrants one source port. Preserve BTC, OKX and 15-minute bars rather than imposing a different instrument or venue for diversity. OKX is underrepresented at 2.6%, and long-short exposure addresses the portfolio's 80.9% long-only concentration. BTC remains a concentration exception justified by faithful source reproduction; supplied corpus_concentration is empty, so its recent share cannot be assessed. Distinguish this contract from the queued BTC ATR-channel strategy by omitting regime filters and preserving the author's exact 45/3 recursion and flip-only exits. Historical failures motivate conservative exposure and explicit cost accounting, not rejection or altered signal rules.

negative_expectancy: decline optimization of this frozen BTC OKX 15-minute 45/3 SuperTrend adaptation. Thousands of completed trades lose after modeled costs and credited funding, including before reported liquidation. This rejects the supplied perpetual, market-order, equity-sized port, not the source author's quarterly-contract strategy or SuperTrend generally. Review the position-metric and post-liquidation inconsistencies separately. The required outbox file could not be written because this session permits read-only filesystem access.

Implementation

BTC OKX 15-minute long-short SuperTrend source port with fixed 45/3 settings, completed-bar transitions, taker market execution and confirmed close-before-reopen reversals. Positions use a 0.5% equity budget against a 3×ATR sizing reference, capped at 25% equity notional. Exits occur only when direction changes.

Preserves the author's Wilder ATR seed, zero-initialized final bands, recursive line selection and equality conventions from [FMZ's JavaScript SuperTrend article](https://www.fmz.com/digest-topic/5438). Uses the requested linear perpetual and market-order approximation without additional filters or exits. ATR-based sizing does not guarantee a maximum loss because no protective stop exists. Indicator and reversal state are scalar attributes, with constant per-bar computation. Performance claims remain unverified. The requested outbox file could not be written because this workspace permits read-only filesystem access; the complete task-bound JSON is returned here.

Verification Results

Return 1 and let calculate_signal enforce its own 46-bar initialization, or explicitly seed the indicator from the buffered history once. Keep orders suppressed during the configured warmup.

The framework does not call calculate_signal until min_bars_required is satisfied. Returning 46 therefore starts the incremental ATR on input bar 46, and its first valid value occurs on input bar 91. The initial 45 buffered bars are unused, delaying initialization and changing the initial indicator boundary relative to processing all supplied bars.

The truncated sandbox reports -0.189% net return per trade, PF 0.687 and substantial commission and impact costs. Check full-history economics; these smoke-test losses do not establish a correctness defect.

Backtest Review

Sharpe
-0.24
Total return
-100.00%
Max drawdown
100.00%
Trades
5431
Win rate
32.5%
Profit factor
0.88

Trade records support the intended flip-only mechanism: all 5,430 consecutive transitions alternate direction and reopen at the preceding exit timestamp.

Substantial evaluated sample: 5,431 closed trades across approximately 6.4 years.

QA's economic concern is borne out: net average trade return is -0.0999%, profit factor 0.875 and Sharpe -0.242.

The 5,145 trades closed before reported liquidation already lost approximately 99,986 USDT; rejection does not depend solely on the terminal liquidation metric.

All trading parameters are contract-fixed and there are no tunable parameters. No verified implementation repair supports iteration.

Reported average position size of 193.2% conflicts with peak entry leverage of 25.0%; trading continues after reported liquidation. These reporting/accounting symptoms require separate review; their causes are unverified.

Sampled buy-and-hold curve returned approximately 1,010.2% with 74.9% drawdown. This comparison supplements the independently negative trading expectancy.

Outcome Summary

This rejection applies to the tested perpetual-contract adaptation; it does not establish the performance of the source quarterly-contract strategy or SuperTrend generally.

Backtest review voted to abandon because expectancy was negative after modeled costs and credited funding, with no tunable parameters or verified implementation repair supporting iteration. Optimization and subsequent analyst and risk reviews were not reached; position-metric and post-liquidation inconsistencies were flagged for separate review.

Trade BTCUSDT.OKX long and short on completed 15-minute SuperTrend direction changes using fixed ATR 45/3 settings, market orders and equity-relative sizing.

The backtest reported 5,431 closed trades, -100% return, Sharpe -0.242 and profit factor 0.875. Average net trade return was -0.0999%; trades closed before reported liquidation had already lost approximately 99,986 USDT.

Analysis

JavaScript版本SuperTrend策略

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