Техническое задание
Overview
I am seeking a developer to design and build an automated forex trading bot that uses an integrated currency-strength (forex index) scanner to identify and trade pairs where one currency shows clear strength and the other shows clear weakness. The bot must follow the direction of the stronger currency (trend-following) and place entries and exits using rule-based signals and a trailing stop. The system must include a gold (XAU) index scanner and should never open trades where both sides of the pair are simultaneously strong or simultaneously weak.
Objectives
-
Automatically scan currency indexes (and gold index) to determine relative strength/weakness.
-
Select and trade symbols comprised of a strong-index currency vs a weak-index currency.
-
Enter trades in the direction of the strong index using configurable entry rules.
-
Exit trades with configurable rules and a trailing stop that secures profits.
-
Prevent trades where both constituent currencies are strong or both are weak.
-
Use automatic lot sizing based on a configurable percentage of account equity (with manual adjustment option).
-
Provide transparency (logs, trade history, performance metrics) and user-adjustable parameters.
Core Features & Functional Requirements
-
Currency Strength / Index Scanner
-
Compute a currency strength index for each major currency and for gold (XAU).
-
Support configurable timeframes for the scanner (e.g., 1H, 4H, Daily).
-
Present strength values numerically (and optionally visually) so threshold rules can be applied.
-
Allow thresholds for "strong" and "weak" to be set by the user.
-
-
Trade Selection Logic
-
Automatically form candidate symbols by pairing a strong-index currency with a weak-index currency (including XAU pairs like XAUUSD if gold is strong/weak relative to USD).
-
Exclude pairs where both currencies are classified as strong or both as weak.
-
Allow a whitelist/blacklist of symbols to restrict trading universe.
-
-
Entry Rules
-
Configurable entry conditions (examples: momentum confirmation, price pullback to EMA, breakout, indicator confluence).
-
Option for waiting for candle close on chosen timeframe before entry.
-
Optional limit/market order selection.
-
-
Position Sizing & Lots
-
Auto-calculate lot size based on a percentage of account equity risk or account size (user-configurable).
-
Provide min/max lot limits and an adjustable risk-per-trade parameter.
-
Option for fixed lot sizing.
-
-
Exit Rules & Risk Management
-
Configurable initial stop-loss (pips or ATR-based), take-profit, and trailing stop logic.
-
Trailing stop should be active after a configurable profit threshold and be adjustable (fixed pips, ATR multiple, or percentage-based).
-
Max concurrent trades and per-symbol trade limits.
-
Daily and per-trade drawdown limits to prevent catastrophic losses.
-
-
Gold Index Scanner
-
Include gold (XAU) in the same strength/index framework as currencies.
-
Allow gold to be paired against currencies (e.g., XAUUSD) when appropriate.
-
-
Backtesting & Forward Testing
-
Provide backtesting capabilities on historical data (user-supplied or broker data).
-
Forward-testing / demo account support before deploying to live capital.
-
-
Execution & Broker Integration
-
Integrate with popular broker APIs (examples: MetaTrader 4/5, cTrader, or REST-based brokers). Exact broker(s) to be agreed.
-
Order management: open, modify (for trailing stops), and close orders reliably with reconnection/retry logic.
-
-
User Interface & Controls
-
A simple UI (web, desktop, or lightweight GUI) to view scanner results, active trades, P/L, and to edit parameters.
-
Ability to start/stop the bot, and to switch between demo and live mode.
-
-
Logging & Reporting
-
Detailed trade logs, error logs, and daily performance summaries.
-
Exportable trade history (CSV) and basic performance KPIs (win rate, expectancy, max drawdown).
-
Non-Functional Requirements
-
Reliability: Robust handling of API disconnects and data feed issues.
-
Security: Secure storage of API keys; minimal privileges recommended for trading accounts.
-
Configurability: Most parameters should be editable without code changes.
-
Portability: Cross-platform or deployable on a VPS for 24/7 operation.
Constraints & Rules (explicit)
-
Do not open trades where both currency indexes are classified as strong or both classified as weak.
-
Gold (XAU) must be included as an index and treated equivalently to currencies when forming trade candidates.
-
Lot sizing must be automatic by percentage and also user-adjustable.
-
Trailing stops, entry, and exit rules must be configurable and visible to the user.
Deliverables
-
Working trading bot that connects to the agreed broker(s) and runs in demo/live modes.
-
Source code repository (Git) with clear README and setup instructions.
-
Simple UI to manage the bot and view scanner/trade outputs.
-
Documentation: installation, configuration, parameter descriptions, and operational guidance.
-
A short handover session (recorded or live) to explain operation and how to change parameters.
Acceptance Criteria
-
Bot correctly identifies strong/weak currency pairs (including gold) and only trades strong vs weak combinations.
-
Trades use the configured sizing and risk controls; trailing stop functions as specified.
-
Bot demonstrates stable execution in a demo account with logs available.