Skip to Content
IPDAGetting Started

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 edit

For Deriv:

cp .env.example.deriv .env.deriv

Key variables to fill in:

VariablePurpose
DATA_API_URL, DATA_API_KEYMarket-data endpoint (default: mt5-trader candles) and auth
MT5_SIGNAL_API_URL, MT5_SIGNAL_API_KEYmt5-trader signal endpoint and API key
QUOTE, MT5_SYMBOLSingle instrument (omit when using SYMBOLS_FILE)
PIP_SIZEPrice movement of one pip — set explicitly
REVERSAL_SENSITIVITY, REVERSAL_OVERSOLD, REVERSAL_OVERBOUGHTLive RSI trigger (14 / 25 / 75)
USE_HARD_TARGETS, STOP_LOSS_PIPS, TAKE_PROFIT_PIPSMust keep hard targets on; default 40 / 50
TRADING_SESSIONSSession gate (tokyo,new_york, or empty for 24/7)
NOTIFICATIONS_ENABLED, NOTIFICATION_SERVICE_URLOut-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

  1. Start the matching mt5-trader profile first (:8000 forex, or --profile deriv on :8001). Ensure source="ipda" is accepted by mt5-trader’s SignalSource.
  2. When NOTIFICATIONS_ENABLED=true, start notification-service at NOTIFICATION_SERVICE_URL (default http://127.0.0.1:3010).

Run ipda

ipda # or ipda --profile forex ipda --profile deriv

Run 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.jsonl only. Signal fires, session skips, break-even events, and mt5-trader submit outcomes appear on the console and in JSONL under LOGS_DIR.
  • IPDA posts to notification-service for signal_skipped_out_of_session and break_even_reached when enabled. Execution-outcome alerts after a fill still come from the paired mt5-trader profile when its own notifications are on.

Next steps

Last updated on