{ "strategy": { "name": "ETH Robust Price TWAP 15m", "symbol": "ETH-USDT-SWAP", "bar": "15m", "side": "long_only", "leverage": 3, "trend_sma": 60, "rsi_length": 2, "rsi_threshold": 3.0, "exit_rsi": 50.0, "stop_loss_pct": 0.012, "max_hold_bars": 48, "entry_offsets": [0.003, 0.006, 0.009], "entry_valid_bars": 4, "fill_buffer": 0.0, "selected_reason": "eth-twap-robustness-10y-summary.md recommends r3x50 because it stayed positive across tested cost models and rolling 1y windows." }, "source_read": [ "okx_codex_trader/okx_client.py", "okx_codex_trader/cli.py", "okx_codex_trader/paper_engine.py", "freqtrade/README.md", "freqtrade/user_data/strategies/BtcRsi2Guarded.py", "scripts/search_eth_price_twap_variants.py", "scripts/search_eth_twap_robustness_10y.py", "scripts/explore_ultrashort.py", "reports/eth-exploration/eth-twap-robustness-10y-summary.md", "reports/eth-exploration/README.md" ], "signal_clock": { "compute_at": "Every 15m candle boundary after the just-closed candle can be fetched from OKX history-candles with confirm flag 1.", "decision_candle": "The latest confirmed 15m candle only.", "order_start": "The next 15m candle after the decision candle.", "unconfirmed_candle_rule": "Do not use ticker, current market candle, or a history-candles row whose confirm flag is not 1 for indicators." }, "entry_orders": { "type": "three post_only isolated long limit orders", "base_price": "decision_candle.close", "prices": [ "close * (1 - 0.003)", "close * (1 - 0.006)", "close * (1 - 0.009)" ], "size": "planned_margin_usdt / 3 per level, converted with build_contract_size(slice_margin * 3, limit_price, instrument_meta)", "validity": "valid through four full 15m bars after the decision candle", "cancel_rule": "Cancel all unfilled entry levels when validity ends, when an exit signal appears, when stop is hit, or when any tracked position closes." }, "partial_fills": { "avg_entry_price": "sum(fill_price * fill_contracts * ct_val) / sum(fill_contracts * ct_val)", "margin_used": "sum(fill_notional_usdt) / leverage", "stop_price": "avg_entry_price * (1 - 0.012)", "position_start_time": "first fill timestamp", "entry_index": "15m bar index containing the first fill" }, "exit_and_stop": { "signal_exit": "When confirmed candle RSI2 >= 50.0 or held bars >= 48, cancel remaining entry orders and close tracked long position.", "stop_exit": "If last/mark price reaches stop_price before signal exit, close tracked long position immediately.", "maker_taker_assumption": "Entry is maker only because post_only is required. Signal exit and stop are taker for the live design because execution priority is flat exposure, matching maker_taker cost accounting.", "exit_order_type": "reduce_only market close for signal exit and stop during real-funds test; later maker exit is a separate design." }, "state_file": { "identity": ["strategy_id", "symbol", "bar", "td_mode", "pos_side", "leverage"], "signal": ["last_confirmed_candle_ts", "last_signal_candle_ts", "indicator_values", "decision"], "orders": ["client_order_id", "okx_order_id", "level", "price", "requested_size", "filled_size", "state", "created_at", "expires_at"], "position": ["filled_contracts", "filled_notional_usdt", "avg_entry_price", "margin_used", "stop_price", "first_fill_ts", "entry_candle_ts"], "risk": ["planned_margin_usdt", "max_margin_usdt", "isolation_tag"], "audit": ["updated_at", "events"] }, "minimum_real_funds_test": { "account_mode": "OKX isolated hedge mode, ETH-USDT-SWAP long side only.", "isolation": "Use a dedicated OKX subaccount or demo first. If using the current account, require no existing ETH-USDT-SWAP long position before the test and tag all orders with a deterministic client order id prefix.", "funding": "Use the minimum margin that satisfies OKX minSz after contract conversion for all three slices.", "dry_run": "Run signal and order-intent generation for at least one full signal without submitting orders.", "live_probe": "Submit one full three-level cycle with tiny margin, wait four bars, verify fills/cancels, then force a manual flat check with okx-account." }, "minimal_implementation_path": [ "Add a read-only signal command that emits the next-cycle entry plan from confirmed candles.", "Add an order-intent command that converts the signal plan into three post_only order payloads without submitting.", "Add a state-backed quasi-live runner that can submit/cancel/query orders only after explicit live confirmation.", "Add tests with a fake OKX session for candle confirmation, order price/size, partial fill averaging, stop price, expiry, and state persistence.", "Keep freqtrade as comparison only; do not implement this live runner inside freqtrade." ] }