Skip to content
All strategies

Strategies

Faithful port of berlinguyinca's Freqtrade AdxSmas (ADX14>25 + SMA3/SMA6 cross, 10% ROI, -25% stop) on NEARUSDT spot 1h

Outcome: Abandoned

FreqtradeAdxSmasNearSpot

Outcome Summary

FreqtradeAdxSmasNearSpot replicated the Freqtrade AdxSmas rules (ADX-gated SMA3/6 cross, +10% ROI, -25% stop) on NEARUSDT 1h spot, and its trades matched that spec. Over about 6 years it made 745 trades with profit factor 0.80 and avg_trade_return_pct of -0.467%; before fees, the mean price-only return per trade was about -0.014%. At backtest review the analyst abandoned it for negative expectancy, noting that optimization would only replay a fully frozen configuration, so the optimization, analysis and risk stages were never run. The analyst also flagged a ledger anomaly for separate engine review: a -100% liquidation on a 1x cash account, and trades that kept printing P&L afterwards.

Hypothesis

Faithful port of the Freqtrade strategy 'AdxSmas' by Gert Wohlgemuth (berlinguyinca), GPL-3.0, itself converted from sthewissen's Mynt AdxSmas.cs. Credit to the author; any performance the source claims is unverified and our own backtest with real fees decides. The Freqtrade Python file is the spec, and its rules and defaults are kept unchanged: timeframe 1h, TA-Lib ADX(14), SMA(3) as 'short', SMA(6) as 'long'. ENTER LONG when ADX > 25 and short crosses above long. EXIT on signal when ADX < 25 and long crosses……Show moreShow less

Faithful port of the Freqtrade strategy 'AdxSmas' by Gert Wohlgemuth (berlinguyinca), GPL-3.0, itself converted from sthewissen's Mynt AdxSmas.cs. Credit to the author; any performance the source claims is unverified and our own backtest with real fees decides. The Freqtrade Python file is the spec, and its rules and defaults are kept unchanged: timeframe 1h, TA-Lib ADX(14), SMA(3) as 'short', SMA(6) as 'long'. ENTER LONG when ADX > 25 and short crosses above long. EXIT on signal when ADX < 25 and long crosses above short. minimal_roi {'0': 0.10} means a +10% take-profit at any trade age. stoploss = -0.25. Long-only (Freqtrade default can_short=False). The Mynt C# original uses SMA(3)/SMA(10) and an asymmetric cross test; the Python version is ported, not the C# one. Only these were adapted for our platform: (1) Venue and instrument: NEARUSDT.BINANCE_SPOT. The strategy is long-only and unleveraged, so it belongs on spot. NEAR was chosen because it has multi-year 1h spot history and little use in the corpus, which avoids the over-mined BTC/ETH and the LINK/DOT/ATOM series used in the latest Freqtrade ports. The source names no pair. (2) Execution: Freqtrade fills a signal at the next candle's open. On a 24/7 venue this becomes the registry equivalent, a market order at the signal bar's close. (3) The -25% stoploss and the +10% ROI exit are intrabar protective orders, as in Freqtrade backtesting, which checks both against candle low/high: a reduce-only stop-market at entry*0.75 and a take-profit at entry*1.10, both matched intrabar by the platform. Where one bar touches both, the engine's adaptive OHLC ordering applies, since same_bar_policy is not selectable. (4) Sizing: one position at a time (Freqtrade max_open_trades=1 with stake_amount 'unlimited'), with 95% of account equity per entry. The 5% cash buffer covers the 0.10% taker fee and rounding. No pyramiding: entry signals are ignored while a position is open. Fees: Binance spot 0.10% taker per side, ~0.20% round trip. Fee arithmetic is stated honestly: the SMA3/6 cross on 1h bars is a fast signal. A typical 1h NEAR trend leg after an ADX>25 cross is ~1.5-3%. Losing trades usually do not exit on the signal, because the exit also requires ADX<25, so they can run to the -25% stop. Wins cap at +10%. The expected average trade is therefore uncertain, and it may fall below the 0.25% spot floor. This is a faithful replication objective, not a predicted winner. Novelty (L202): no earlier run ports AdxSmas. Its distinguishing rule is the ADX-gated asymmetric entry/exit (trend strength >25 to enter, weakness <25 plus the reverse cross to exit). It differs from the failed LTC SMA crossovers (no ADX gate, no ROI/stop ladder) and from the Freqtrade EMA20+OBV and Supertrend ports.

negative_expectancy (fee-floor check: avg_trade_return_pct -0.467% vs the +0.25% BINANCE_SPOT floor). The raw fill-price return per trade is -0.014% before the ~0.20% round-trip fee, about -0.21% net before any impact, so fees are not the cause: the gross edge is about zero. Evidence: 745 long trades on NEARUSDT 1h spot (2020-10 to 2026-10), PF 0.80, win rate 43%, executed-signal IC -0.011. Mean gross per-trade return is negative in 2022, 2024 and 2025 and flat in 2023. QA's smoke-window concern (-0.57%/trade, PF……Show moreShow less

negative_expectancy (fee-floor check: avg_trade_return_pct -0.467% vs the +0.25% BINANCE_SPOT floor). The raw fill-price return per trade is -0.014% before the ~0.20% round-trip fee, about -0.21% net before any impact, so fees are not the cause: the gross edge is about zero. Evidence: 745 long trades on NEARUSDT 1h spot (2020-10 to 2026-10), PF 0.80, win rate 43%, executed-signal IC -0.011. Mean gross per-trade return is negative in 2022, 2024 and 2025 and flat in 2023. QA's smoke-window concern (-0.57%/trade, PF 0.64) is borne out on the full history. Optimization cannot help: the contract fixes every parameter and the tunable set is empty. Scope: this rejects only the faithful Freqtrade AdxSmas port (ADX14>25, SMA3/6, +10% ROI, -25% stop, 95% equity) on NEARUSDT.BINANCE_SPOT 1h. It does not test the Mynt SMA3/10 original or other pairs. OPERATOR LEDGER NOTE (separate from the verdict): the account shows -100% / liquidated on 2021-12-18 on a 1x CASH account. Compounding about -0.21% net over 745 trades implies roughly -80%, not -100%. Trades also keep printing P&L through 2026 on a zero-equity curve (last trade qty 833, +$181). Other inconsistencies: avg_position_pct 131%, avg_holding_bars 0 against a 1d5h average hold, and $117k of folded impact against $65k of commission. The same pattern was flagged on BchOkxFmzSingleSuperTrend453 and FreqtradeSupertrendLinkSpot. It needs an engine/ledger review, but the price-level returns are negative regardless.

Implementation

Faithful port of berlinguyinca's Freqtrade AdxSmas on NEARUSDT spot 1h. Enter long when TA-Lib ADX(14) > 25 and SMA(3) crosses above SMA(6) (qtpylib crossed_above: now short>long, previous short<=long). Exit on signal when ADX < 25 and SMA(6) crosses above SMA(3). Every entry is a bracket: a venue-managed -25% stop-market and a +10% take-profit limit, both matched intrabar. One position at a time, 95% of equity, long-only, no leverage.

The Freqtrade Python file is the spec. ADX is an incremental, exact mirror of TA-Lib's ADX: Wilder DM/TR rules, (period-1)-bar seed sums, the first ADX as the mean of the first `period` DX values (first value on bar 2p-1), then Wilder smoothing. A zero TR or zero DI sum skips the update, as TA-Lib does. The SMAs come from a bounded deque. All indicator state is scalar attributes. calculate_signal returns the continuous SMA spread (% of SMA6). The entry/exit cross flags are computed on the same bar and read by……Show moreShow less

The Freqtrade Python file is the spec. ADX is an incremental, exact mirror of TA-Lib's ADX: Wilder DM/TR rules, (period-1)-bar seed sums, the first ADX as the mean of the first `period` DX values (first value on bar 2p-1), then Wilder smoothing. A zero TR or zero DI sum skips the update, as TA-Lib does. The SMAs come from a bounded deque. All indicator state is scalar attributes. calculate_signal returns the continuous SMA spread (% of SMA6). The entry/exit cross flags are computed on the same bar and read by should_enter/should_exit. Freqtrade's minimal_roi {0: 0.10} and stoploss -0.25 are the base-template bracket legs (stop_loss_pct/take_profit_pct). These mirror the frozen plan keys stoploss/roi_take_profit and carry the same values. should_exit implements only the signal exit, so nothing double-exits. Sizing is 95% of settled equity / close, and the base caps it to affordable cash including the taker fee. Fee concern noted: losing trades usually reach neither the ADX<25 reverse-cross exit nor the TP and can run to -25%, so the average trade may fall below the 0.25% spot floor. That is the faithful behaviour and is kept.

Verification Results

None required. Optionally update indicators on every bar, including the bars below the minimum, to match Freqtrade's full-history ADX more closely.

min_bars_required() returns 100, which overrides the base default deliberately and matches the contract's warmup_bars=100. The base template does not call calculate_signal until 100 bars are buffered. So the ADX/SMA state starts at bar 100, and the first ADX value arrives about 27 bars later (bar ~127). Freqtrade computes ADX over the full history. TA-Lib's Wilder smoothing converges, so after warmup the difference is negligible.

None.

Sizing is 95% of get_account_equity() / close. _submit_entry_bracket passes it through _affordable_size, which caps it to free cash including the taker fee, so a CASH overspend cannot happen. One position at a time is enforced by the base (should_enter is evaluated only while flat). This matches Freqtrade max_open_trades=1 with stake 'unlimited'.

In the unoptimized smoke window (533 days, 258 closed long trades), avg_trade_return_pct is -0.57% against the 0.25% spot floor, PF is 0.64 and win rate 44%. Commission is only 11% of gross, so the gross edge itself looks negative, not just fee drag. This matches the hypothesis's own warning: losers do not reach the ADX<25 reverse-cross exit and run toward the -25% stop (largest loss -$19.2k), while winners are capped at +10%. All parameters are frozen and tunable is empty, so optimization cannot change this. The full-history backtest decides. Accounting question for the analyst: -100% total return with a 'liquidated' flag on a 1.0x CASH account does not square with -0.57%/trade x 258 trades at 95% exposure (roughly -75% compounded). There is also $28.5k of folded impact, avg_position_pct is 252% and avg_holding_bars is 0.0 against a 1d7h average hold. Reconcile the ledger before reading the -100% as signal evidence. The same pattern was flagged on the FreqtradeSupertrendLinkSpot port.

Backtest Review

Sharpe
0.10
Total return
-100.00%
Max drawdown
100.00%
Trades
745
Win rate
42.8%
Profit factor
0.80

The trades match the spec. All 745 trades are long-only. Exits fall between -25% and +10% fill-to-fill, which matches the stop/ROI bracket. Entries follow the ADX>25 + SMA3/6 cross. Input data is clean (0 missing bars apart from reviewed outages).

745 closed trades over 6 years is a reliable sample.

Fee-floor check: reported avg_trade_return_pct is -0.467% against the +0.25% BINANCE_SPOT floor. That figure includes impact that may be overstated (see the ledger note), so I also checked the raw fill prices in the detail file. The mean price-only return per trade is -0.014% (47.8% winners) BEFORE the ~0.20% spot round trip, which puts it near -0.21% net. Negative expectancy therefore does not depend on the ledger questions.

PF is 0.80, win rate 42.8% and executed-signal IC is -0.011 (t=-2.4). Mean gross price return by entry year: 2020 +0.36%, 2021 +0.57%, 2022 -0.32%, 2023 0.00%, 2024 -0.98%, 2025 -0.30%, 2026 +1.03%. The gross edge is not stable and its overall mean is about 0.

The payoff is asymmetric, as the hypothesis predicted. Wins are capped at +10%. Losers rarely reach the exit, because it needs both ADX<25 and the reverse cross, so they can run to the -25% stop (largest loss -$35.5k).

All parameters are frozen (tunable = {}), so optimization would only replay the same fixed configuration.

Outcome Summary

A fast SMA3/6 cross on 1h bars, with wins capped at +10% and losers allowed to run to a -25% stop, had no gross edge on NEAR spot. Future ports should first check that the price-only edge is clearly above the ~0.20% round-trip cost. Separately, the -100% liquidation on a 1x cash account needs an engine/ledger review.

The analyst abandoned it at backtest review for negative expectancy: avg_trade_return_pct was -0.467% against the +0.25% BINANCE_SPOT floor, the gross edge was about zero and changed from year to year, and the executed-signal IC was -0.011. Optimization could not help because every parameter was fixed and the tunable set was empty.

A faithful port of berlinguyinca's Freqtrade AdxSmas strategy on NEARUSDT spot 1h: go long when ADX(14) > 25 and SMA(3) crosses above SMA(6), exit when ADX < 25 and SMA(6) crosses back above SMA(3), with a +10% take-profit and a -25% stop.

The backtest covered 2020-10 to 2026-10 with 745 long trades: total return -100% (the account was liquidated on 2021-12-18), Sharpe 0.10, profit factor 0.80, win rate 42.8%, and avg_trade_return_pct -0.467%. The raw fill-price return was about -0.014% per trade before fees, or roughly -0.21% after the ~0.20% spot round-trip cost.

Analysis

AdxSmas

Analysis

AdxSmas.py

AdxSmas.cs

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