Add web dashboard, historical data loader, and backtest reporting

- Add Flask dashboard with status, config editor, logs, kill switch,
  and backtest results pages with monthly P&L breakdowns
- Add historical_loader.py for paginated OANDA candle fetching (1yr+)
- Update backtester to $100k starting equity, monthly P&L computation,
  and JSON summary output for dashboard display
- Update config to EUR_USD only on M5/M15 with SMA 21/50 strategy
- Add backtest.html template with performance metrics and bar charts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Brent Neale
2026-02-17 13:29:12 +10:00
parent ef950f25dd
commit 212f581d01
15 changed files with 1359 additions and 42 deletions
+12
View File
@@ -465,6 +465,18 @@ if __name__ == "__main__":
print(f"Running on {interval}s loop. Press Ctrl+C to stop.\n")
while True:
try:
# Check for config reload signal from dashboard
reload_signal = get_project_root() / "RELOAD_CONFIG"
if reload_signal.exists():
print("\n*** CONFIG RELOAD REQUESTED ***")
try:
reload_signal.unlink()
except OSError:
pass
cfg = load_config()
interval = cfg.get("execution", {}).get("interval_seconds", 60)
print(f"Config reloaded. Interval now {interval}s.\n")
main()
print(f"\nSleeping {interval}s until next run...\n")
time.sleep(interval)