Skip to content
All strategies

Strategies

2MOMEMA (geraked, MIT) faithful port: Fast-Momentum 100-Cross Confirmed by 9 Bars of Slow-Momentum and EMA10>EMA34 Alignment, Swing-Stop 1:1 Bracket, Long-Short (SOLUSDT.BYBIT 1H, pure OHLCV, single position)

Outcome: Abandoned

SolTwoMomEmaSwingBracketLS

Outcome Summary

SolTwoMomEmaSwingBracketLS was a user-requested faithful port of the 2MOMEMA expert advisor, moved onto the Bybit SOL perpetual on 1-hour bars so it could take both long and short trades. The hypothesis itself noted that faithful ports of public scripts have repeatedly failed in this pipeline and that only a backtest with real fees would decide. That test never happened: after 2 iterations the run was abandoned at coding with 'coding_stuck_3_timeouts', leaving no backtest, optimization or analyst verdict. Whether the strategy has an edge remains untested.

Hypothesis

Faithful statement of the MQL5 expert advisor '2MOMEMA' by geraked (https://github.com/geraked/metatrader5/blob/d3eb29c382acf715727d5cd6a0414151e821fc2d/Experts/2MOMEMA.mq5, MIT licence, credit to the author). The EA uses two MT5 Momentum indicators on close (iMomentum = 100 * close[t] / close[t-N]) with FastPeriod=10 and SlowPeriod=34. It also uses two EMAs on close with the same periods (EMA10, EMA34). Signals are evaluated once per NEW BAR and only on CLOSED bars: shift 1 is the bar that just closed and shift……Show moreShow less

Faithful statement of the MQL5 expert advisor '2MOMEMA' by geraked (https://github.com/geraked/metatrader5/blob/d3eb29c382acf715727d5cd6a0414151e821fc2d/Experts/2MOMEMA.mq5, MIT licence, credit to the author). The EA uses two MT5 Momentum indicators on close (iMomentum = 100 * close[t] / close[t-N]) with FastPeriod=10 and SlowPeriod=34. It also uses two EMAs on close with the same periods (EMA10, EMA34). Signals are evaluated once per NEW BAR and only on CLOSED bars: shift 1 is the bar that just closed and shift 2 is the bar before it. Entry is a fast-momentum cross of the 100 line. It must be confirmed by the slow momentum and the EMA ordering agreeing on every one of the last 9 closed bars. The stop is the swing extreme of the last SLLookback=10 bars, offset by SLDev=60 points. The take-profit is TPCoef(1.0) x the stop distance, which makes a 1:1 bracket. Position size risks Risk=1% of equity to the stop (RISK_DEFAULT). Only one position is held at a time (MultipleOpenPos=false). Positions exit ONLY through the SL/TP bracket: there is no signal exit, no reversal and no time exit. All optional modules are OFF by default and stay off in the port: Trail, Grid, News, EquityDrawdownLimit=0, Reverse, IgnoreSL, IgnoreTP, SpreadLimit=-1. SLCoef=1.0 is declared but this file never uses it, so the developer must not invent a use for it. Platform mapping: the source is an FX/CFD EA with no fixed instrument, so we place it on SOLUSDT.BYBIT (Bybit linear USDT perp, ~0.11% round trip) on 1-HOUR bars. Reasons: (1) the rule needs shorts, so it must run on a margin venue; (2) it is a pure-price rule, so a venue without supplementary feeds is fine (L160); (3) Bybit holds 1.2% of experiments against Binance's 67%; (4) Bybit has multi-year 1H history (L168); (5) SOL on Bybit is not already in the pipeline. On 1H bars the 10-bar swing stop sits roughly 1.5-3% from entry, which makes the 1:1 target about 14-27x the 0.11% round-trip fee. RISK NOTE (L167): faithful ports of public scripts have repeatedly failed here. This one is submitted because the user asked for a faithful port. The source's performance claims are unverified, and our backtest with real fees decides.

The port keeps the EA's indicator definitions (MT5 iMomentum = 100*C/C[-N]; EMA seeded with the first close), its shift-1/shift-2 cross on closed bars, the 9-bar confirmation (i=1..9 is tracked as a consecutive-bar streak counter, which is equivalent), the SL_SWING stop over bars 1..10 with an SLDev offset, TP = TPCoef*|in-sl|, RISK_DEFAULT 1%-to-stop sizing, and MultipleOpenPos=false. Only the SL/TP bracket exits a position. SLCoef is not used because the source file never uses it. Platform adaptations: (1)……Show moreShow less

The port keeps the EA's indicator definitions (MT5 iMomentum = 100*C/C[-N]; EMA seeded with the first close), its shift-1/shift-2 cross on closed bars, the 9-bar confirmation (i=1..9 is tracked as a consecutive-bar streak counter, which is equivalent), the SL_SWING stop over bars 1..10 with an SLDev offset, TP = TPCoef*|in-sl|, RISK_DEFAULT 1%-to-stop sizing, and MultipleOpenPos=false. Only the SL/TP bracket exits a position. SLCoef is not used because the source file never uses it. Platform adaptations: (1) SLDev 'points' map to 60 x the instrument price tick, so on SOL (0.01 tick) that is $0.60, about 0.4%. (2) Entry fills at market at the signal bar's close, which stands in for MT5's Ask/Bid at the next bar's open. (3) The bracket is venue-managed (STOP_MARKET + LIMIT, OUO), built by overriding _submit_entry with the per-trade stop distance. (4) MT5's MarginLimit 300% becomes a notional cap of equity x leverage (3x), and leverage feeds into the sizing. Trail/Grid/News/Reverse/EquityDD/SpreadLimit are off in the source and are not implemented. Caveat: 1%-to-stop sizing with a 1:1 bracket means the per-trade edge must beat ~0.11% RT on stop distances of ~1.5-3%, and the source's performance claims are unverified.

coding_stuck_3_timeouts

Implementation

Faithful port of geraked's MIT 2MOMEMA EA on SOLUSDT.BYBIT 1H. It enters long when the fast Momentum(10) crosses above 100 and, on each of the last 9 closed bars, slow Momentum(34) was above 100 and EMA10 was above EMA34. Shorts are the mirror. The stop is the 10-bar swing low/high offset by 60 price ticks, the target is 1x the stop distance, and the size risks 1% of equity to the stop. One position at a time, and it exits only through the venue-managed SL/TP bracket.

Iteration History

sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (833 days of SOLUSDT.BYBIT-1-HOUR-LAST-EXTERNAL). This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).

Outcome Summary

Before trying again, find out why coding kept timing out, for example by simplifying the port or narrowing the brief, because the strategy's edge was never tested.

The run was abandoned at the coding stage with reason 'coding_stuck_3_timeouts' after 2 iterations. Verification, backtest review, optimization, analyst review and risk review were never reached.

A faithful port of geraked's MIT-licensed 2MOMEMA MQL5 EA on SOLUSDT.BYBIT 1H, long-short: enter when fast Momentum(10) crosses the 100 line, only if Momentum(34) and EMA10-vs-EMA34 ordering agreed on each of the last 9 closed bars, and exit only through a 1:1 SL/TP bracket set at the 10-bar swing extreme plus 60 points, risking 1% of equity per trade.

No performance data exists: the backtest report is empty and there is no optimization report, so no return, Sharpe or trade-count figures were produced.

Analysis

2MOMEMA

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