Python trading analysis and dashboard tooling for Dukascopy market data, featuring market data fetching and caching, technical analysis and signal generation, position and budget management, a Dash dashboard, and background monitoring with auto-trading helpers.

Python-based trading analysis and automation toolkit for Dukascopy market data.
This project provides a technical framework for downloading, caching, analyzing, and acting on Dukascopy market data. It combines market data processing, indicator calculation, signal generation, portfolio and budget management, and dashboard-based monitoring in a single Python application.
Core Components
- Market Data Layer — Fetches, normalizes, and caches Dukascopy price data for downstream analysis.
- Technical Analysis Engine — Computes indicators and generates trading signals from historical and live market data.
- Position Management — Handles position lifecycle, entry/exit logic, and trade state tracking.
- Budget Management — Tracks available balance, locked margin, commissions, and auto-trading constraints.
- Dashboard Interface — Provides a Dash-based UI for configuring, monitoring, and reviewing trading activity.
- Background Automation — Runs continuous monitoring and auto-trading helpers outside the dashboard refresh cycle.
Technical Features
- Multiple indicators, including SMA, EMA, WMA, Bollinger Bands, Stochastic, Williams %R, Momentum, ROC, OBV, and VWAP
- Signal-based trade entry and exit workflow
- ATR-based stop loss, take profit, and position sizing
- Ichimoku confirmation for additional trade validation
- Entry-price staleness checks to reduce execution on outdated market levels
- One-position-at-a-time execution model with budget-aware restrictions
- Automatic logging of trade actions, signal events, and position updates
Automation Workflow
When enabled, auto-trading evaluates technical signals and market conditions to determine whether a position should be opened or closed. Entry decisions can be filtered by Ichimoku confirmation, while exits may be triggered by take profit, stop loss, trailing stop, or confirmed signal reversal.
The system also includes a background position monitor that checks open trades independently of the dashboard UI, ensuring that risk controls remain active even if the interface is not being refreshed.
Risk Management
The application supports both fixed-size and ATR-driven risk models. In ATR mode, position size and exit distances are derived from current market volatility, providing adaptive trade management across changing conditions. When ATR is disabled or unavailable, the system falls back to percentage-based take profit and stop loss settings.
