The project has three layers:
okx_codex_trader/: reusable trading, data, reporting, and research primitives.scripts/: experiment entrypoints and live runners. A script can define a strategy variant and grid, but should import shared candle loading, time rules, and metrics from the package.reports/: generated outputs only.okx_codex_trader/candles.py
Candle.okx_codex_trader/time_rules.py
okx_codex_trader/research_metrics.py
Strategy mechanics still live in individual scripts because the search space is changing quickly. The first extracted script is scripts/search_eth_time_cycle_filters.py; future strategy searches should follow that shape:
load_candles_csv.time_rules for all session filters.research_metrics for all net-return, horizon, and trade-summary statistics.This keeps experiments easy to compose without forcing a generic strategy framework before the live strategy stabilizes.
Currently migrated strategy searches:
scripts/search_eth_time_cycle_filters.pyscripts/search_eth_bb_squeeze_fixed_rr.pyscripts/search_eth_bb_squeeze_profit_protection.pyscripts/search_eth_dynamic_atr_exits.py still keeps local metrics because it reports full horizon and horizon-level trade stats from exit_ts; extracting that needs a separate direct change to research_metrics.
The current live BB squeeze strategy uses 15m candles for both signals and research execution. That is intentionally simple, but it makes entry and exit sequencing coarse: a 15m candle only gives open, high, low, and close, not the local path.
The next research step is a two-layer model:
The first scope is exit-only refinement:
Entry refinement is a later step. It should only be tested after the exit-only version is measured, because changing entry and exit together makes attribution unclear.
Current 3m entry research tested three local execution families:
The first result is not enough to replace the live execution rule:
The next direct research path is a regime-gated 3m entry selector: use 15m baseline or 3m risk-only as the default, and only enable pullback entry in regimes where the recent market structure supports it.