Skip to content
All strategies

Strategies

gvman99 Hard Entry & Exit Rules on SOL OKX

Outcome: Abandoned

Gvman99HardEntryExitSolOkx

Outcome Summary

This strategy translated gvman99's equity-oriented Pine strategy, built on level retests and EMA taps, to SOL perpetuals on OKX at 5-minute resolution, using default parameters. Over 1743 trades and about 5.6 years the full-history backtest lost 83% (Sharpe -6.17, -0.278% per trade), and the losses were uniform across years, regimes and sides. Before costs the signal showed essentially no edge, and costs turned that into heavy losses. The analyst abandoned it at backtest review after one iteration, so optimization, risk review and promotion were never reached.

Hypothesis

A default-parameter translation of gvman99’s tradable Pine strategy on 5-minute SOLUSDT.OKX perpetual bars. Preserve its two-unit entry, one-unit trim, runner, no pyramiding, bar-close signals, and intrabar limit and stop orders. On this platform, two units mean equal tranches sized from current equity, capped at 20% total notional and 1% initial equity risk. Source performance is unverified.

The supplied code is a tradable strategy. USEQ cannot reproduce its premarket levels because the factory’s USEQ bars begin at 09:30 ET. OKX’s 24/7 bars can express the source’s time windows and long and short rules. The venue change makes the economic premise a new, falsifiable claim; all signal defaults remain fixed.

no_edge: negative_expectancy (code: fee_edge / no_edge). This is the first measured full-history report. On 5m SOLUSDT.OKX, gvman99's Hard Entry & Exit translation made 1743 trades with avg_trade_return_pct -0.278% against the +0.15% floor, PF 0.25, Sharpe -6.17 (CI upper bound -5.25), return -83% and drawdown 83%. Every year, every month except one, and every volatility regime lost money. Long and short sides both lost. Gross forecast edge is about zero (IC -0.004, t=-0.8). Because the exits are tight (resting……Show moreShow less

no_edge: negative_expectancy (code: fee_edge / no_edge). This is the first measured full-history report. On 5m SOLUSDT.OKX, gvman99's Hard Entry & Exit translation made 1743 trades with avg_trade_return_pct -0.278% against the +0.15% floor, PF 0.25, Sharpe -6.17 (CI upper bound -5.25), return -83% and drawdown 83%. Every year, every month except one, and every volatility regime lost money. Long and short sides both lost. Gross forecast edge is about zero (IC -0.004, t=-0.8). Because the exits are tight (resting stop at the 20-EMA, bar-close exit on an 8-EMA cross), commission plus impact ($81k combined) consume the trades, so this is a mechanism with no edge before costs, run at a turnover the costs punish. The optimization plan has no tunable parameters, so optimizing has nothing to search. QA's edge concern is confirmed on a sample about 30x larger than the sandbox's. Scope: this default-parameter port on SOL OKX 5m with NY-equity session levels (PDH/PDL/PMH/PML), which have no particular meaning on a 24/7 crypto perpetual. The result does not cover the original equity-market setting.

Implementation

Trades SOLUSDT.OKX five-minute first-hour level reactions and EMA taps in two equal equity-sized units. A resting limit trims one unit beyond the regular-hours high or low; a resting 20 EMA stop protects the position; the runner exits on the specified bar-close signal or end-of-day window.

Translates the supplied Pine rules and fixed defaults, including UTC exchange-day levels and VWAP, New York session windows, long and short gates, level priority, no pyramiding, and two trades per day. The source's first-touch flags are assigned but never used to gate entry, so its effective first-touch condition is reproduced without that unused state. Unit size is capped by 20% total notional and 1% initial equity risk at the entry-to-20-EMA distance. Independent reduce-only orders are the closest available equivalent to Pine's linked trim and stop exits; same-bar fill ordering can differ. Source performance remains unverified.

Verification Results

Acceptable as written. If live parity matters, use modify_order on the existing stop instead of cancel-and-replace.

The stop and the trim are separate reduce-only orders, not a linked OCO. When the 20-EMA stop is re-priced, the code calls cancel_order and then submits a replacement right away, so for a moment two stops can rest. Reduce-only stops the position from flipping, but on one bar both orders can fill in a different order from Pine's linked exits. The rationale already acknowledges this.

No change required. Optionally, when the trigger is through the market, skip the stop and rely on the bar-close exit.

_sync_orders re-places the stop at self.slow on every bar. If a long's close sits between the 8-EMA and the 20-EMA, the position stays open, and if the 20-EMA then rises above the current price, the reduce-only SELL stop's trigger is through the market. It fills immediately at the next price rather than resting. This is consistent with the 'exit at the 20 EMA' intent, but it executes as a market exit.

Either snapshot equity at start for the risk leg or align the wording. Not blocking.

The hypothesis says '1% initial equity risk'. The code sizes risk from current equity: equity*risk_pct/|price-EMA20|, capped at 20% of current equity in notional. Notional is bounded at 0.2x equity per trade, there is no pyramiding and leverage is 1.0, so the book cannot compound into a blowup. The only gap is the initial-vs-current wording.

None required.

Daily levels (PDH/PDL), VWAP and the trades_today counter all reset on the UTC day boundary, while the windows use New York time. The rationale says this follows the source's exchange-day convention. The trade window always falls between 13:30 and 15:30 UTC, so the mixed clocks never split a session.

The sandbox lost money (56 closed trades, PF 0.18, win rate 23%, avg trade -0.21% of notional) and commission came to 197% of gross PnL. Exits are tight: a resting stop at the 20-EMA and a bar-close exit when price crosses below/above the 8-EMA on 5m SOL. That leaves roughly 0.2-0.5% of room against a round-trip cost of about 0.10% plus impact. The NY equity-session windows (premarket 04:00-09:30, trade window 09:30-10:30) mean nothing special on a 24/7 crypto perp, so the PMH/PML levels and the session gate may be arbitrary here. In the full backtest, check gross PnL before costs and the long/short split. PF 0.18 on only 56 trades is a small sample, but if a PF below 0.7 holds over more than 100 trades, re-derive the polarity before iterating. The tunable set is empty, so if the full backtest stays negative, abandon the run; optimization has nothing to change.

Backtest Review

Sharpe
-6.17
Total return
-83.08%
Max drawdown
83.08%
Trades
1743
Win rate
27.9%
Profit factor
0.25

The strategy works as coded. It made 1743 closed trades over 2050 days, split evenly between long (852) and short (891). Accounting is valid, end-of-period unrealized PnL is 0%, and the input data has no gaps.

Entries are retests of key levels and taps of the EMA, gated by the NY 09:30-10:30 window, so the trade pattern matches the Pine source.

Per-trade economics: avg_trade_return_pct is -0.278%, against the OKX futures floor of +0.15%. PF is 0.25, win rate 27.9% and Sharpe -6.17 (95% CI -7.29 to -5.25). Total return is -83.1% with an 83.1% drawdown.

The result is uniformly negative. All six calendar years lose 23-29%, 68 of 69 months are negative, and the calm, normal and stressed volatility regimes all lose money (Sharpe -7.2, -6.2 and -5.1). Long and short sides both lose (win rates 26% and 29%).

There is no gross edge to protect. The signal's gross forecast edge is -0.004% per 12-bar horizon (IC -0.004, t=-0.8). Commission ($26.8k) plus impact ($54.4k) account for nearly all the losses, and the 8/20 EMA exits on 5m bars give each trade about 0.2-0.5% of room against roughly 0.1% round-trip cost plus impact. Before costs the trades are roughly breakeven; after costs they lose heavily.

This is not beta. Beta is -0.0001 and benchmark correlation is -0.003, so a buy-and-hold comparison is irrelevant: the loss comes from per-trade costs, not from market exposure.

QA's edge concern is confirmed on the full history. The sandbox showed PF 0.18 and -0.21% per trade; the full run shows PF 0.25 and -0.28% across 1743 trades, about 30x the sandbox sample.

Side observation, not the cause of the loss: avg_position_pct is 38.5%, while the hypothesis caps total notional at 20%. This may come from how the metric is computed or from a sizing-cap bug. It does not change the verdict.

Outcome Summary

Session levels built for equities (PDH/PDL/PMH/PML around NY hours) carry no particular meaning on a 24/7 crypto perpetual, and tight 8/20-EMA exits on 5-minute bars leave too little room per trade to cover roughly 0.1% round-trip cost plus impact.

The analyst abandoned it at backtest review for no_edge/negative_expectancy: gross forecast edge was about zero (IC -0.004, t=-0.8), and $26.8k of commission plus $54.4k of impact consumed the trades. Optimization was skipped because the plan had no tunable parameters.

A default-parameter port of gvman99's 'Hard Entry & Exit Rules' Pine strategy to 5-minute SOLUSDT.OKX perpetual bars. It traded retests of key levels (previous-day and premarket highs/lows) and EMA taps during the New York 09:30-10:30 window, entering with two units, trimming one and holding a runner.

Over 2050 days it closed 1743 trades with avg_trade_return_pct of -0.278% (the floor is +0.15%), profit factor 0.25, win rate 27.9% and Sharpe -6.17 (CI -7.29 to -5.25). Total return was -83.1% with an 83.1% max drawdown, and every volatility regime, both sides and 68 of 69 months lost money.

Analysis

Hard Entry & Exit Rules

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