Strategies
Faithful port of CryptoRox 'Built-in Kelly ratio for dynamic position sizing' (TradingView, MPL-2.0): Keltner EMA20/ATR10x1.0 stop-entry stop-and-reverse with running-Kelly sizing, long-short, AVAXUSDT.OKX 4H
Outcome: Abandoned
KeltnerKellyStopReverse
Outcome Summary
KeltnerKellyStopReverse was a line-by-line port of a public TradingView Keltner breakout strategy with stop-and-reverse and Kelly sizing, assigned to AVAXUSDT.OKX 4H to add long-short OKX coverage to the corpus. The developer produced a partial FactoryStrategy implementation, but the coding stage timed out three times over 2 iterations and the run was abandoned ('coding_stuck_3_timeouts'). No backtest, optimization or analyst review ran, so the Keltner breakout family still has no measured verdict.
Hypothesis
coding_stuck_3_timeouts
Implementation
Faithful port of CryptoRox's 'Built-in Kelly ratio for dynamic position sizing' (TradingView, MPL-2.0) on AVAXUSDT.OKX 4H bars. The Keltner channel is EMA(close,20) +/- 1.0 x ATR(10), with ATR as the Wilder RMA of the true range. When a close crosses over the upper band, the strategy places or replaces a resting BUY STOP at high + 1 tick. When a close crosses under the lower band, it places or replaces a SELL STOP at low - 1 tick. A pending stop is cancelled when price closes back through the basis; the source's latched crossBcond/crossScond quirk is kept. A stop fill reverses the book (order qty = qty + |position|), and a same-direction entry is ignored (pyramiding=0). Size is 100% of starting equity / close. When the running Kelly ratio of the strategy's own closed trades is > 0, size is current equity x Kelly / close instead. An optional TP of 10% and SL of 1% off the average entry is ported but disabled by default.
Iteration History
sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of AVAXUSDT.OKX-4-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
Faithful stop-and-reverse ports with resting stop orders, reversal quantities and running Kelly counters are complex to code. Simplify the order-management layer, or split it into smaller pieces, so the developer can finish before the coding-stage timeout.
The run was abandoned in the coding stage with reason 'coding_stuck_3_timeouts' after 2 iterations. Verification, backtest, optimization, analyst and risk review were never reached.
A faithful port of CryptoRox's TradingView 'Built-in Kelly ratio' strategy: a long-short, always-in-market Keltner channel (EMA20 +/- 1.0x ATR10) system that enters and reverses on stop orders and sizes each position by a running Kelly fraction of its own closed trades, run on AVAXUSDT.OKX 4H bars.
No performance was measured: the backtest report is empty and no optimization report exists, so there are no return, Sharpe or trade-count figures.
Analysis
Built-in Kelly ratio for dynamic position sizing
Backtest and paper results are hypothetical. Trading involves risk of loss.