Add Event Source¶
Onboard a new economic event to the forex trading bot, ensuring the full pipeline is ready: the cron schedule covers the event time, strategy params match the MC analysis, the calendar has the dates, and Dukascopy history is downloaded.
Trigger: /add-event-source
How It Works¶
- Identify the event — name, country/currency pair, release time (ET), frequency, and whether it comes from Forex Factory or a static calendar.
- Check MC approval — read the matching report in
docs/research/(produced by MC Analysis) to confirm the pair+event passes walk-forward validation and note the recommended params. Warn on AVOID/BORDERLINE. - Check cron coverage — the bot must be running before the event. Work back from event time through pre-event lead time and TWS startup to the required cron entry.
- Calendar source — Forex Factory (auto-scraped) or
config/static_events.yaml(manual, official dates cross-referenced from two sources). - Check
config/settings.yaml— instrument present,straddle_pair_overridesparams from MC,event_overrideswhere an event needs different params than the pair default, spread limits. - Dukascopy data — verify the pair is downloaded; if not, run Backfill.
- Turso sync window — the sync cron must cover event time through the max holding window.
- Summary checklist — a pass/fail table before making any changes on a feature branch.
Cron Coverage¶
Bad: assuming the bot is always running
The bot only runs when TWS is started by cron. No covering entry = not running.Good: calculate back from event time
Event-Specific Params¶
Bad: overwriting the pair default
Changing USDJPY defaults changes all USDJPY events.
Good: event_overrides
Notes¶
- Verify every event time against the official source — BOJ in particular announces at varying times.
- Paper trading (port 4002/7497) runs unattended; live trading (4001/7496) needs 2FA and cannot auto-start.
- For events that fire only 8–12x/year, a daily "just in case" cron wastes resources — consider a wrapper that checks the schedule first.
- Upstream of this skill: MC Analysis (approval) and Backfill (data). Downstream: Trade Review to confirm it performs live.