Getting Started
IPDA is a Python signal service. It polls candles, evaluates the RSI Buy Chance / Sell Chance reversal, gates on trading sessions, submits market orders to a paired MT5 Trader instance, and can notify via notification-service.
Create a virtualenv and install
cd ipda
python3.12 -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"tzdata is a hard dependency so session windows work on Windows (which ships no system tz
database).
Configure .env
Copy the forex example (or use a named profile — see Profiles):
cp .env.example.forex .env # then editFor Deriv:
cp .env.example.deriv .env.derivKey variables to fill in:
| Variable | Purpose |
|---|---|
DATA_API_URL, DATA_API_KEY | Market-data endpoint (default: mt5-trader candles) and auth |
MT5_SIGNAL_API_URL, MT5_SIGNAL_API_KEY | mt5-trader signal endpoint and API key |
QUOTE, MT5_SYMBOL | Single instrument (omit when using SYMBOLS_FILE) |
PIP_SIZE | Price movement of one pip — set explicitly |
REVERSAL_SENSITIVITY, REVERSAL_OVERSOLD, REVERSAL_OVERBOUGHT | Live RSI trigger (14 / 25 / 75) |
USE_HARD_TARGETS, STOP_LOSS_PIPS, TAKE_PROFIT_PIPS | Must keep hard targets on; default 40 / 50 |
TRADING_SESSIONS | Session gate (tokyo,new_york, or empty for 24/7) |
NOTIFICATIONS_ENABLED, NOTIFICATION_SERVICE_URL | Out-of-session + break-even alerts |
SUPERTREND_* values in the env file are inert unless you switch strategies in code. See
Configuration for the full table.
Start paired services
- Start the matching mt5-trader profile first (
:8000forex, or--profile derivon:8001). Ensuresource="ipda"is accepted by mt5-trader’sSignalSource. - When
NOTIFICATIONS_ENABLED=true, start notification-service atNOTIFICATION_SERVICE_URL(defaulthttp://127.0.0.1:3010).
Run ipda
ipda
# or
ipda --profile forex
ipda --profile derivRun exactly one instance per profile. Two instances against one profile duplicate every trading decision.
PIP_SIZE must be set explicitly, and USE_HARD_TARGETS must stay true. Startup
fails if hard targets are off (RSI has no price-level stop). See
Hard Targets.
Logging & notifications
- Successful candle fetches are silent on the console. Fetch failures go to
errors.jsonlonly. Signal fires, session skips, break-even events, and mt5-trader submit outcomes appear on the console and in JSONL underLOGS_DIR. - IPDA posts to notification-service for
signal_skipped_out_of_sessionandbreak_even_reachedwhen enabled. Execution-outcome alerts after a fill still come from the paired mt5-trader profile when its own notifications are on.
Next steps
- Signal Logic — Buy Chance / Sell Chance and mid-candle lock
- Pine Script — enable Reversal Signal on the chart
- Sessions — Tokyo / New York gates
- Notifications — notification-service events
- Break-even — advisory MFE watcher
- Operator runbook — deployment checklist
- Configuration — every env variable