Skip to content
All strategies

Strategies

CEZLSMA port (geraked, MIT): Chandelier Exit flip + Heikin-Ashi close vs ZLSMA(50), 50% trailing stop, 1.5x grid adds, long-short on LTCUSDT.BINANCE 15m

Outcome: Abandoned

CezlsmaChandelierZlsmaGridLS

Outcome Summary

CezlsmaChandelierZlsmaGridLS tried to replicate geraked's CEZLSMA MT5 expert on LTCUSDT 15m Binance perps: Chandelier Exit flips filtered by Heikin-Ashi close against ZLSMA(50), with trailing stops and a x1.5 averaging grid. The hypothesis itself warned that lessons L167 (faithful FX ports die) and L171 (grid designs die) applied. Coding timed out three times, the run was abandoned as 'coding_stuck_3_timeouts', and no backtest, optimization or analyst review ever ran, so the strategy's viability was never measured.

Hypothesis

A line-for-line port of geraked's MetaTrader 5 expert CEZLSMA.mq5 v1.6 (MIT licence, github.com/geraked/metatrader5, commit d3eb29c). The original ran on AUDUSD M15. Credit for the strategy goes to the author. Indicators are read once per new bar, from the last CLOSED bar [1] and the bar before it [2]. (1) Heikin-Ashi close HA_C = (O+H+L+C)/4 of the regular candle. (2) Chandelier Exit with ATR period 1 and multiplier 0.75: longStop = highest(1) - 0.75*ATR(1), shortStop = lowest(1) + 0.75*ATR(1), each ratcheted……Show moreShow less

A line-for-line port of geraked's MetaTrader 5 expert CEZLSMA.mq5 v1.6 (MIT licence, github.com/geraked/metatrader5, commit d3eb29c). The original ran on AUDUSD M15. Credit for the strategy goes to the author. Indicators are read once per new bar, from the last CLOSED bar [1] and the bar before it [2]. (1) Heikin-Ashi close HA_C = (O+H+L+C)/4 of the regular candle. (2) Chandelier Exit with ATR period 1 and multiplier 0.75: longStop = highest(1) - 0.75*ATR(1), shortStop = lowest(1) + 0.75*ATR(1), each ratcheted the usual way. Direction flips to long when close > the prior shortStop and to short when close < the prior longStop. The buy buffer CE_B holds the longStop value ONLY on the bar where direction flips to long (0 otherwise); CE_S does the same for the sell side. The developer should mirror geraked's Indicators/ChandelierExit.mq5 exactly, including its useClose setting. (3) ZLSMA(50): lsma = linreg(src, 50, 0), lsma2 = linreg(lsma, 50, 0), ZLSMA = 2*lsma - lsma2. The EA passes a second argument 'true', which in geraked's ZLSMA.mq5 selects the Heikin-Ashi close as the source. Mirror that file. Venue translation: the FX source maps to BINANCE USD-M perps, because the strategy is long-short and uses margin (MarginLimit 300%). LTCUSDT was chosen because it is a liquid, low-share instrument in our corpus with multi-year 15m history on Binance (15m is not viable on Hyperliquid, and OKX 15m depth is unverified). BINANCE is over quota, and we accept that because of the 15m history requirement. Point-based distances are translated relative to price: SLDev = 650 points on AUDUSD (about 0.0065 at ~0.68) becomes 0.95% of price. Settings that are off in the source stay off: News=false, SpreadLimit=-1, EquityDrawdownLimit=0, MultipleOpenPos=false, Reverse=false, GridTrailingStopLevel=0. Martingale on loss is off by default. Fees: Binance USD-M taker 0.05% per side on every market order, including each grid add. Caution: faithfulness carries the source's risks. Our distilled lessons L167 (faithful ports of FX/zero-fee scripts die) and L171 (grid/inventory designs die) apply directly. This is pre-registered as a faithful replication for the backtest to judge, not a claim of edge.

Iteration 2 fixes the Layer-3 sandbox timeout with no change to trading logic. (1) Per-bar cost grew with history: every bar with an open basket called the base _close_pending(), which iterates cache.orders() (every order ever created), and the basket cancelled and re-submitted its trailing-stop / TP / grid orders every bar, so the order cache grew about 2 orders per bar. The result was O(n^2). (2) The basket's close-pending check now scans only cache.orders_open() (a handful of orders). (3) Resting orders go through _sync_orders(): the desired set (type, side, qty, price at instrument precision) is compared with the open orders, and cancel/re-submit happens only when the set changed. Per-bar work is now O(zl_period + open orders), independent of the backtest span. Bar-level approximation kept from iteration 1: the EA's 30-second timer is replaced by venue-resting stop/limit orders re-evaluated at each 15m close. Caveat (per L167/L171): a faithful grid port of an FX script is expected to struggle against Binance fees; the backtest judges.

coding_stuck_3_timeouts

Implementation

Faithful port of geraked's CEZLSMA v1.6 (MIT) on LTCUSDT.BINANCE 15m. Entry on a Chandelier Exit flip (ATR(1) on Heikin-Ashi candles, mult 0.75), filtered by HA close vs ZLSMA(50) of HA close. SL distance = CE stop -/+ 0.95% of price, 3% risk sizing capped at 3x margin. Single position: 50% trailing stop. Grid: adds of 1.5x volume every pd against the basket, basket TP at first-position risk + costs. Close on an HA/ZLSMA cross when the basket is net-profitable.

Iteration History

sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (208 days of LTCUSDT.BINANCE-15-MINUTE-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

Line-for-line ports of multi-file MT5 experts (custom indicators plus EAUtils grid, trail and volume logic) can be too large to finish within the coding time limit, so scope the translation down or split it before coding starts.

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

A faithful port of geraked's MIT-licensed MT5 expert CEZLSMA v1.6, moved from AUDUSD M15 to LTCUSDT.BINANCE 15m perps: it enters long or short on a Chandelier Exit (ATR 1, x0.75) direction flip confirmed by the Heikin-Ashi close against ZLSMA(50), with a 50% trailing stop and x1.5 averaging-grid adds. The hypothesis registered it as a replication test, not a claim of edge.

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

Analysis

CEZLSMA

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