Skip to content
All strategies

Strategies

Kalvey16 Previous-VWAP Rolling Limit — ETH OKX 5-Minute Faithful Port

Outcome: Abandoned

Kalvey16PreviousVwapRollingLimitEthOkx

Outcome Summary

The strategy translated kalvey16’s previous-VWAP limit rules to ETH OKX five-minute trading with adapted position sizing. After one iteration, its full-history backtest produced 1,712 closed trades, a -43.04% return and Sharpe -1.57. Backtest review abandoned it for negative expectancy, including losses before execution costs, and found no justified optimization path because all parameters were frozen. Optimization, post-optimization analysis and risk review were not reached.

Hypothesis

Faithfully translate kalvey16's TradingView strategy, using the supplied complete Pine code as authoritative. Preserve every signal, order-management rule and default input except position sizing, which the submission explicitly permits adapting. Trade ETHUSDT.OKX on 5-MINUTE bars, long and short, with no pyramiding. The attached chart shows MYM1! on CBOT at 5 minutes, two blue VWAP/previous-VWAP overlays and an overnight decline followed by an advance; no clearly readable entry/exit annotations establish……Show moreShow less

Faithfully translate kalvey16's TradingView strategy, using the supplied complete Pine code as authoritative. Preserve every signal, order-management rule and default input except position sizing, which the submission explicitly permits adapting. Trade ETHUSDT.OKX on 5-MINUTE bars, long and short, with no pyramiding. The attached chart shows MYM1! on CBOT at 5 minutes, two blue VWAP/previous-VWAP overlays and an overnight decline followed by an advance; no clearly readable entry/exit annotations establish performance. The other image is an author avatar. This tests the source rules on a supported crypto instrument, not a reproduction of CBOT micro-Dow trading. Use daily session-anchored VWAP, not an N-bar rolling VWAP; for this crypto venue the daily anchor is 00:00 UTC. The NY trading and flattening clocks remain unchanged and DST-aware. Preserve stopPts=75.0 and targetPts=150.0 as absolute USDT price distances, not ticks or percentages. Historical Pine evaluation is at completed bars despite calc_on_every_tick=true; this contract reproduces that historical mode, not unrecorded realtime tick recalculations. Newly submitted limits cannot fill retrospectively within the bar that generated them. Intrabar protective stops and resting target limits are platform-matched, with the engine's adaptive OHLC ordering when both are touched. Force-flat market orders use the registry's continuous-market equivalent: execution at the decision bar's close rather than a separately scheduled next-bar-open fill. All source parameters are frozen. Claims of profitability are unverified.

The submitted exact rules take priority over autonomous mechanism selection. OKX is underrepresented at 2.9% versus its 5% target, and retaining both directions addresses the portfolio's 78.7% long-only concentration. Hyperliquid was avoided because its 5-minute history cap would compromise long validation. The empty corpus_concentration object supplies no evidence that ETH or 5-minute bars are below the concentration threshold. The substantive replication objective is the source's previous-bar session-VWAP limit replacement and loss-dependent same-direction re-entry state machine, rather than another generic oscillator fade. Do not add confirmation filters or alter the author's distances to improve backtest results.

negative_expectancy: This frozen ETH OKX five-minute port loses across 1,712 closed trades, including before execution costs. Average net trade return is -0.1605% against the +0.15% review floor. Optimization of an empty tunable set is not justified. This rejects the specified crypto translation and adapted sizing, not kalvey16's source strategy on CBOT micro-Dow or other markets.

Implementation

UTC daily HLC3 VWAP with rolling previous-bar VWAP long/short limits, NY trading window, fixed 75/150 USDT stop/target, same-direction loss re-entry blocks and timed flattening.

Preserves the supplied Pine historical-bar state machine and frozen inputs. Bar-open timestamps drive VWAP resets and DST-aware NY clocks. Loss events are consumed at the next bar close; protective exits are installed at the first close observing an open position. Pending limits are updated before the base resting-order guard; no historical bar range is used to manufacture fills. Profitability is unverified.

Verification Results

If exact fidelity matters, submit the opposite-side limit directly in calculate_signal right after the cancel (it is a different side, so it cannot stack), or accept the 1-bar lag on trend flips. This is minor and mostly affects trades just after a flip.

When the desired side flips while an entry limit is resting (e.g. L-VWAP is open and trendShort becomes true), calculate_signal calls cancel_order. The order can still be open in the cache during the same bar, so the base _process_primary returns 'order_in_flight' before should_enter runs. The new opposite-side limit is then submitted one bar later than in Pine, where strategy.cancel and strategy.entry happen on the same bar close. Same-direction rolling (modify_order) is not affected.

Only call modify_order when the price or quantity actually differs. Consider routing the limit entry through any base limit helper that applies the paused and market-ready guards.

should_exit calls modify_order on the existing stop and target every bar with unchanged quantity and price. NautilusTrader logs an error and ignores a modify that changes nothing. It is harmless but noisy. Separately, should_enter calls submit_order directly, so it bypasses the base entry helpers' _market_ready and _paused_blocks checks. That only matters in paper/live.

No change required.

min_bars_required returns 1, so the strategy may trade on the first bar's partial-session VWAP. The contract declares warmup_bars=289. prev_valid gating plus the session VWAP reset make this harmless; it matches Pine, which only needs vwap[1].

The sandbox ran 69 days on 5m bars with one unoptimized draw: 53 trades, PF 0.76, avg_trade_return_pct -0.12%, and commissions at 22% of gross. On ETH, the frozen 75/150 USDT stop/target is a ~2-5% move at recent prices but 25-50% of price at 2020 lows (ETH ~$110-400). So the early part of the full history will trade with very wide stops and few exits other than the time-based flatten. The pullback-to-previous-VWAP limit fill rewards adverse selection: a limit order only fills when price comes back against the previous-bar trend, so look at gross per-trade return before fees. All parameters are frozen and the tunable set is empty, so the full backtest is the only measurement.

Backtest Review

Sharpe
-1.57
Total return
-43.04%
Max drawdown
43.87%
Trades
1712
Win rate
45.7%
Profit factor
0.74

Reliable full-history evaluation with 1,712 closed trades, both directions represented, valid accounting and no open end position.

Trade samples match daily flattening: 1,442 exits occurred at 16:50 New York, consistent with evaluating the 16:45-open five-minute bar at its close.

Negative expectancy: average net trade return -0.1605% versus the +0.15% futures review floor, PF 0.739 and total return -43.04%.

Executed entry/exit prices and quantities imply approximately -$13,673 before commissions, modeled impact and funding; costs worsen an already losing result. QA's economic concern is borne out.

All source parameters are frozen and no tunable parameters exist. No specific implementation defect or measured improvement region supports iteration or optimization.

Outcome Summary

This frozen ETH translation and adapted sizing showed no viable edge; the result does not establish how the source strategy performs on CBOT micro-Dow or other markets.

Backtest review issued an abandon verdict because expectancy was negative even before execution costs and average net trade return missed the +0.15% review floor. With no tunable parameters or identified implementation defect, optimization and later review stages were not reached.

Port kalvey16’s previous-VWAP limit strategy to ETHUSDT.OKX five-minute bars, preserving frozen long/short rules, daily UTC VWAP anchoring and New York trading clocks while adapting position sizing.

Across 1,712 closed trades, the backtest returned -43.04% with Sharpe -1.57 and maximum drawdown 43.87%. Average net trade return was -0.1605%, and profit factor was 0.739.

Analysis

VWAP Touch | Rolling Prev-VWAP Limit | Time Window | S/L TP

Analysis

VWAP Touch | Rolling Prev-VWAP Limit | Time Window | S/L TP — Strategy by kalvey16

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