5259e6e039
New independent trading daemon (oanda_daemon.py) that places orders on an Oanda v20 practice account instead of sending Telegram alerts. Oanda-only market data (oanda_provider.py, mid candles + real bid/ask spread) through the unchanged signal pipeline; order execution and trade management via oanda_executor.py (raw requests, no new deps). Book parity with the backtester: no broker-side TP (exits = SL/TRAIL/ TIMEOUT only), bar-close-only trail ratchet with each closed bar processed exactly once, 5-bar per-TF entry cooldown, structural SL from the setup. Accepted divergence: one position total (skipped signals logged for book reconciliation). Safety/ops: fail-fast boot on rejected credentials (transient outages continue), market orders never retried (double-fill risk), entry lock against aligned-boundary races, restart recovery + adoption via oanda_state.json, hourly heartbeat, asyncio exception handler, every failure path logged. Prices formatted at instrument precision. Config: env OANDA_* -> config.json "oanda" section (validated in app_config). Tests: Module 15 (30 tests), suite 240 green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VUnCqjWBuvKRSjLwHeB9BJ
36 lines
383 B
Plaintext
36 lines
383 B
Plaintext
# Secrets
|
|
.env
|
|
.env.local
|
|
config.json
|
|
|
|
# Oanda daemon state
|
|
oanda_state.json
|
|
|
|
# Editor / tooling
|
|
.claude/
|
|
.vscode/
|
|
.idea/
|
|
|
|
# Python
|
|
__pycache__/
|
|
*.pyc
|
|
*.egg-info/
|
|
.venv/
|
|
venv/
|
|
|
|
# OS
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# Logs
|
|
*.log
|
|
|
|
# Backtesting data (keep scripts, ignore generated files)
|
|
backtest/cache/
|
|
backtest/*.csv
|
|
backtest/trailgrid/
|
|
backtest/trailgrid5m/
|
|
backtest/__pycache__/
|
|
.env.*
|
|
logs/
|