AdaFourHourMacdBullishCrossoverHistogramAccelerationLong
Hypotheses
ADA 4H MACD Bullish Crossover with Histogram Acceleration Long-Only on ADAUSDT.BINANCE
Hypotheses
A long-only, single-instrument MACD-crossover momentum strategy on ADAUSDT.BINANCE — confirmed testable per the FULL series of recent successful ADA-4H single-instrument pipeline additions (ADADonchianBreakoutLong4HOnly, ADAWeekendCalendarEffectLong, ADAVolContractionSqueezeLong, ADABullishRSIDivergenceLong, ADADonchianBreakdownShort4HOnly all backtested cleanly on ADA-4H bars alone — establishing this as the most reliable testable setup). Structurally distinct from every prior ADA pipeline strategy: those use price-channel (Donchian), calendar timing (weekend effect), vol regime (squeeze), mean reversion (BB), or single-series momentum extreme (RSI). This is the FIRST MACD-based strategy in the portfolio — using the GAP between two EMAs (12 and 26 periods) as the directional signal, plus the MACD-histogram's acceleration as a confirmation. The mechanism (Appel 1979 'Time Trend Identification with Charts and Technical Methods'; Appel 2005 'Technical Analysis: Power Tools for Active Investors'; confirmed in crypto by Caporale-Plastun 2018, Day-Glass-Wang 2020): a bullish MACD crossover (MACD line crosses ABOVE signal line) indicates a regime transition where short-term momentum is accelerating relative to medium-term momentum. The classic crossover has a HIGH false-signal rate in choppy markets — so the strategy adds a HISTOGRAM ACCELERATION filter (histogram bar n > histogram bar n-1 > histogram bar n-2) which restricts entries to ACCELERATING bullish regimes only. This addresses the failure mode of the prior Keltner range strategy: the histogram-acceleration filter ENSURES we only enter during clearly-trending (not range-bound) conditions. The MACD signal is structurally distinct from the RSI used in ADABullishRSIDivergenceLong — RSI measures momentum MAGNITUDE; MACD measures momentum DIRECTION via EMA-gap. The two signals are empirically uncorrelated in practice. Uses ONLY ADAUSDT.BINANCE 4H bars — single instrument, single timeframe, no cross-asset audit_stale risk. Fills critical gaps: (1) FIRST MACD-BASED strategy in portfolio (entirely new signal class — EMA-gap rather than price/volatility/calendar/RSI), (2) Single-instrument simplicity, (3) Long-only with proper trend filter (the histogram acceleration), (4) Confirmed-testable instrument. Position sizing: 18% per trade. Risk per trade: ~1.5% capped by stop-loss.
Hypotheses
Iteration-2 minimal fix for the Layer-2 TypeError (_ema() takes 2 positional arguments but 3 were given). Root cause: the EMA helper was a @staticmethod, but the Layer-2 _StrategyProxy rebinds class callables onto a stand-in instance, which discards the staticmethod descriptor and passes the proxy instance as an injected first positional argument, so the 2-param function was called with 3 args and raised in every scenario. The fix moves the EMA helper out of the class to the module-level function _macd_ema (module functions are never instance-bound, so no self can be injected) and updates its three call sites in _compute_histogram. Nothing else changed: imports stay clean (Layer 1 green), and the MACD/histogram/crossover/acceleration signal logic plus entry/exit/sizing are byte-identical, so no earlier-layer regression. Venue remains BINANCE USD-M futures with leverage 1.0; sizing references self.config.leverage but 1.0 means no amplification (the long-only edge needs no margin), so the leverage_set_but_unused gate does not trigger.
Hypotheses
ADA 4H MACD bullish-crossover has effectively no edge and is untradeable: profit_factor 1.023, Sharpe 0.058 (CI -0.85 to 0.93), win_rate 33%, and per-trade expectancy ~0.07% which is BELOW the ~0.15% futures cost floor (and the +17.2% headline is ~5.7% realized once the 11.5% end-unrealized open position is removed). Decisively, impact_cost_pct is 50.5% (modeled market impact eats half the gross PnL) with capacity only ~$392K, so the apparent edge exists only at near-zero size — the strategy over-trades ADA at 4H (427 trades/~67yr, $10.2k commission + $5.8k impact). It is also front-loaded and decaying: positive only in the early bull years (2020/2021/2023) and negative in 4 of 7 years (2022 -8.9%, 2024 -8.7%, 2025 -2.7%, 2026 -7.0%) with rolling Sharpe to -4 by 2026 — the classic MACD-crossover whipsaw failure that the histogram-acceleration filter did not fix. The code is correct and trades as specified, so this is no-edge economics plus a structural liquidity/over-trading limit, not a code defect — iterate cannot help and optimizing a PF-1.02 base would fit the early bull years and fail the recent holdout. Not worth 2 hours. This matches the abandoned ADA range-outlier (impact 36%, capacity $790K) and NEAR 1H Donchian (impact 118%, capacity $71K) profiles. FAILURE PATTERN: MACD-crossover momentum (even with a histogram-acceleration filter) on a mid-liquidity alt at 4H produces a break-even, untradeable result (PF 1.02, Sharpe 0.06, ~0.07% per trade below the cost floor, impact 50% of gross, capacity ~$392K) because the crossover whipsaws in chop and the high trade frequency lets impact/commissions dominate — oscillator-crossover signals on alts do not generate a fee-surviving edge and the result is front-loaded into early bull years before decaying.
Implementation
Long-only MACD bullish-crossover + histogram-acceleration momentum on ADAUSDT.BINANCE USD-M futures, 4H bars, pure OHLCV single feed. Builds the classic 12/26/9 MACD (macd line = EMA12-EMA26, signal = EMA9 of macd, histogram = macd - signal). Enters LONG when the histogram just turns positive (bullish crossover) AND is strictly rising over the last 3 bars (acceleration filter that screens out choppy false crossovers). Exits on a bearish crossover (histogram <= 0), an 8% stop, or a 16% take-profit. The signal returned every bar is the MACD histogram value (continuous, varies bar-to-bar); the crossover+acceleration condition gates entry. leverage 1.0.
Verification Results
Verification failed (Layer 2 — synthetic scenarios):
Parameters used: ['accel_bars', 'fast_period', 'slow_period', 'min_notional', 'per_trade_pct', 'signal_period', 'stop_loss_pct', 'take_profit_pct']
Check that __init__ sets all attributes from self.parameters.get().
- steady_uptrend: TypeError: AdaFourHourMacdBullishCrossoverHistogramAccelerationLong._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692120000)
- steady_downtrend: TypeError: AdaFourHourMacdBullishCrossoverHistogramAccelerationLong._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692120000)
- flat_ranging: TypeError: AdaFourHourMacdBullishCrossoverHistogramAccelerationLong._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692120000)
- volatility_spike: TypeError: AdaFourHourMacdBullishCrossoverHistogramAccelerationLong._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692120000)
- zero_volume: TypeError: AdaFourHourMacdBullishCrossoverHistogramAccelerationLong._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692120000)
- price_gap: TypeError: AdaFourHourMacdBullishCrossoverHistogramAccelerationLong._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692120000)
Backtest Review
Implemented correctly and trades as specified: 427 MACD-crossover entries, 0 dropped, all long; healthy raw sample; first MACD mechanism in the portfolio
Backtest Review
Effectively no edge: profit_factor 1.023, Sharpe 0.058 (CI -0.85 to 0.93), win_rate 33%, expectancy +$13.3/trade (~0.07%, BELOW the 0.15% futures cost floor); realized ~5.7% (end_unrealized 11.5% of the +17.2% headline)
Backtest Review
Untradeable at scale: impact_cost_pct 50.5% (impact eats half of gross PnL), capacity only ~$392K — edge real only at near-zero size
Backtest Review
Over-trades and fee-bleeds: 427 trades (~67/yr) cost $10.2k commission + $5.8k impact (4.06% of gross)
Backtest Review
Front-loaded and decaying: positive only in 2020/2021/2023; negative in 4 of 7 years (2022/2024/2025/2026), rolling Sharpe to -4 by 2026 — classic MACD whipsaw failure
Outcome Summary
This strategy introduced the portfolio's first MACD mechanism — a long-only ADA 4H bullish-crossover gated by histogram acceleration to avoid choppy false signals. A prior iteration crashed in Layer-2 on a staticmethod descriptor issue; the iter-2 fix (module-level EMA helper) let it run, producing 427 trades. But the edge was essentially break-even (PF 1.02, Sharpe 0.06, ~0.07%/trade below the cost floor) and undeployable — 50% impact cost and ~$392K capacity — with returns front-loaded into 2020/2021/2023 and negative in four of seven years. The analyst abandoned it before optimization, concluding the crossover whipsaws in chop despite the acceleration filter, that over-trading a mid-liquidity alt lets fees and impact dominate, and that tuning would only overfit the early bull years and fail the recent holdout.
Outcome Summary
Oscillator-crossover momentum (MACD, even with a histogram-acceleration filter) on a mid-liquidity alt at 4H does not generate a fee-surviving edge — the crossover whipsaws in chop, the high trade frequency lets impact/commissions dominate (50% of gross, ~$392K capacity), and the result is front-loaded into early bull years before decaying, matching the abandoned ADA range-outlier and NEAR 1H Donchian profiles.
Outcome Summary
The analyst abandoned it at backtest review as no-edge economics plus a structural liquidity/over-trading limit rather than a bug — the code traded exactly as specified, but the MACD crossover whipsaws in chop (the histogram-acceleration filter did not fix it), the per-trade edge is below the cost floor, and over-trading ADA at 4H lets impact (50% of gross) and commissions dominate, so optimizing a PF-1.02 base would only fit the early bull years and fail the recent holdout.
Outcome Summary
A long-only MACD bullish-crossover momentum strategy on ADAUSDT 4H perpetual futures (pure OHLCV) — the portfolio's first MACD mechanism — entering long when the 12/26/9 histogram just turned positive (MACD crossed above signal) AND was strictly accelerating over 3 bars (a filter meant to screen out choppy false crossovers), exiting on a bearish crossover, a percentage stop, or a take-profit.
Outcome Summary
Over a 427-trade sample (~67/year, all long, none dropped) it had effectively no edge: profit factor 1.023, Sharpe 0.058 (CI -0.85 to 0.93), win rate 33%, expectancy +$13.3/trade (~0.07%, below the 0.15% futures cost floor), 25% max drawdown; the +17.2% headline was ~5.7% realized once the 11.5% end-unrealized open position is removed, it was undeployable at scale (impact cost 50.5%, capacity only ~$392K), and positive only in 2020/2021/2023 with rolling Sharpe to -4 by 2026.
Backtest and paper results are hypothetical. Trading involves risk of loss.