Specification
This is the Requirements Specification for your project, formatted to be clear, concise, and structured. This document will allow a professional MQL5/Python developer to accurately estimate the complexity, time, and cost of building your IATS.
IATS Project: Expert Advisor (MQL5) & Python Hub Specification
Job Title: AI-Validated Algorithmic Execution System Developer (MQL5/Python)
Project Goal: Build the high-speed execution engine and orchestration layer for a risk-first automated trading platform.
I. System Architecture & Environment
| Component | Responsibility | Technology | Requirements |
|---|---|---|---|
| Execution Engine | Trade Management, Data Feed, Auditing. | MQL5 (MT5) | Must be compiled for MetaTrader 5 (64-bit). |
| Orchestration Hub | AI Calls, Risk Calculation, Dashboard Server. | Python 3.10+ (with requests, Streamlit, SQLite) | Must run reliably 24/7 on a Windows VPS. |
| Communication | Bidirectional link between Python and MQL5. | Local HTTP/WebSockets (or file-based bridge) | Must ensure near-instantaneous (low-latency) command execution. |
| Risk Boundary | Max Risk Per Trade. | 1.0% of current account equity. | Non-negotiable hard limit. |
II. Module 1: MQL5 Expert Advisor (The Engine)
The MQL5 EA must perform three core functions: Execution, Management, and Data Fetching.
A. Execution and Lot Sizing
* Instruction Input: The EA must constantly listen for and accept a single JSON command payload from the Python Hub, containing: Symbol, Type, Entry, SL, TP1, TP2, TP3, and the three pre-calculated Lot Sizes (\mathbf{40\%/30\%/30\%}).
* Order Placement: Upon receiving a command, the EA must immediately open three separate market orders (Orders A, B, C) simultaneously for the target symbol, ensuring all orders share the same Initial Stop Loss (SL) but have unique Take Profit (TP) levels (TP1, TP2, TP3, respectively).
* Unique Tracking: All three orders must be placed with a shared, custom Magic Number for unit tracking.
B. Mandatory Trade Manager (40%/30%/30% Protocol)
This logic must be implemented inside the OnTick() loop and use status flags to ensure rules are only executed once per trigger.
| Rule | Trigger Condition (Example: BUY Trade) | Required Action (Using PositionClosePartial and PositionModify) |
|---|---|---|
| Rule 1: Risk Elimination | Current Price (Bid) >= TP1 | 1. Close Order A (40% volume). 2. IMMEDIATELY Modify SL for the remaining \mathbf{60\%} (Orders B & C) to the Initial Entry Price (Breakeven). |
| Rule 2: Profit Securing | Current Price (Bid) >= TP2 and Rule 1 is complete. | Close Order B (30% volume). |
| Rule 3: Final Close | Current Price (Bid) >= TP3 and Rule 2 is complete. | Close Order C (30% volume), concluding the trade cycle. |
C. Data Feed and Auditing
* Market Context Feed: The EA must calculate and package two pieces of data to send to the Python Hub upon request:
* Trend Bias: Current price position relative to the 200-period EMA on the H4 timeframe (ABOVE or BELOW).
* Volatility Check: Current Bid/Ask Spread in pips.
* Audit Data Capture: Upon complete closure of the trade unit (Orders A, B, C are closed), the EA must calculate and log:
* Final P/L (Profit/Loss).
* Trade Duration.
* Maximum Intrade Drawdown (MID): The largest unfavorable movement suffered by the position from the entry price before final closure.
III. Module 3: Python Orchestration Hub
The Python Hub manages external communication, the AI pipeline, and the final risk gate.
A. Core Risk and Lot Sizing
* Maximum Risk Enforcement: The Hub must calculate the Total Lot Size based strictly on the current account balance and the \mathbf{1.0\%} risk limit, using the \text{SL} distance extracted by Agent 1.
* Volume Allocation: The calculated Total Lot Size must be split into 40\%, 30\%, and 30\% components before being sent to the MQL5 EA.
B. Three-Stage Gemini AI Pipeline
The Hub must execute three sequential, independent calls to the Gemini 2.5 Flash API (TEXT_API_URL) for every incoming signal. The pipeline halts on any Veto signal.
| Agent | Input Data | Output Veto Rule |
|---|---|---|
| Agent 1: Translator | Raw Telegram Text | VETO: If JSON output is malformed or critical data (SL, TP) is missing. |
| Agent 2: Auditor | Raw Telegram Text | VETO: If Confidence Score is below 80 (threshold must be dynamically adjustable via the Streamlit Dashboard). |
| Agent 3: Strategist | Clean JSON from Agent 1 + Market Context Data from MQL5 | VETO: If the AI determines the trade violates a strategic rule (e.g., trading against the H4 200 EMA, or Spread > 2.0 pips). |
C. Dashboard and State Management
* Streamlit Integration: Host the Streamlit web application on the VPS, dynamically reading and writing configuration variables (the three AI Prompts and Veto thresholds) to the SQLite database.
* Live Data Integration: Pull and display current equity, P/L, and the logged MID/Audit data from the SQLite database onto the dashboard.
* Gemini Dashboard Features: Implement the Auto-Refine Prompt (Text Generation API) and the TTS Weekly Recap (TTS API).
IV. Required Expertise & Timeframe
| Requirement | Level | Note |
|---|---|---|
| MQL5 Development | Expert | Deep experience required with complex order modification (PositionModify) and partial closures (PositionClosePartial). |
| Python Development | Expert | Required for multi-API orchestration (Gemini, Telegram), database management, and web framework (Streamlit) deployment. |
| Development Time | 8 Weeks | This is the minimum required timeline for clean coding and rigorous cross-platform testing of the complex bi-directional communication layer and trade management logic. |
Responded
1
Rating
Projects
30
20%
Arbitration
8
63%
/
13%
Overdue
9
30%
Free
2
Rating
Projects
47
85%
Arbitration
1
0%
/
100%
Overdue
9
19%
Free
3
Rating
Projects
513
19%
Arbitration
35
43%
/
31%
Overdue
34
7%
Loaded
4
Rating
Projects
202
48%
Arbitration
5
20%
/
60%
Overdue
2
1%
Free
5
Rating
Projects
1
0%
Arbitration
1
0%
/
100%
Overdue
0
Free
6
Rating
Projects
13
38%
Arbitration
1
0%
/
100%
Overdue
1
8%
Free
7
Rating
Projects
4
25%
Arbitration
0
Overdue
0
Working
Published: 2 articles
8
Rating
Projects
84
64%
Arbitration
5
100%
/
0%
Overdue
9
11%
Free
9
Rating
Projects
35
23%
Arbitration
4
0%
/
50%
Overdue
2
6%
Working
10
Rating
Projects
478
40%
Arbitration
105
40%
/
24%
Overdue
82
17%
Loaded
Published: 2 codes
11
Rating
Projects
20
0%
Arbitration
10
0%
/
80%
Overdue
6
30%
Free
12
Rating
Projects
28
32%
Arbitration
4
50%
/
25%
Overdue
4
14%
Working
13
Rating
Projects
1
0%
Arbitration
1
100%
/
0%
Overdue
0
Free
Similar orders
Poptavka ZN
35 - 40 USD
Požadavky: platforma MetaTrader 5, jazyk MQL5; předání úplného a čitelného zdrojového kódu .mq5 a všech potřebných .mqh souborů; zákazů knihoven, DLL, vzdálených serverů a externí licenční kontroly; zákaz martingale, gridu, navyšování pozice po ztrátě a obchodování bez stop-lossu; výpočet velikosti pozice podle procenta rizika a skutečné měny účtu; nastavitelné maximální denní riziko a celkové čerpání; ochrana proti
I am looking to convert my existing TradingView Pine Script (v5) strategy into an MQL5 Expert Advisor (EA) for MetaTrader 5. Strategy Details: Asset: Gold (XAUUSD) Timeframe: 15-minute Strategy Logic: The strategy is based on a breakout concept. Anchor Candle: The base calculation starts from the Specified Candle Entry Window: The EA should only look for entries As Per Indicator Risk Management: The strategy
Professional MT5 Expert Advisor – Multi-Engine Trading Framework Description I'm looking for an experienced MQL5 developer to build a professional MetaTrader 5 Expert Advisor. This is not a simple indicator-based EA. The system should be designed using a modular architecture with a strong focus on maintainability, optimization, and future scalability. The first version should include the following features. Market
Description: I need an experienced MQL5 developer to build a professional MT5 Expert Advisor for XAU/USD based on my trading strategy. I require the full .mq5 source code and the compiled file. Trading Logic: Timeframes: H4 to determine overall direction, H1 for supply and demand zones, M15 for trade entries. Buy conditions: H4 trend is bullish, price reaches a valid H1 demand zone, liquidity sweep occurs below the
Standby Description . Prop Firm Environment . ( Monitor Execution and Handling Environment Changes as Required ) . Technical Issues . Delete extra lines of code (Clean Code , Folder) . Asset related translation , no need for Logic Alteration
Only Technical Issues . Familiarization to Different Symbols . [Again Technical Assistance Only] . Deleting extra lines of code , Not Required Folders (Clean Code) . No Need for Logic Alteration (Strictly)
MultiPair_PriceAction
30 - 200 USD
OANDA market watch clock and symbols (.sim) Multipair able so i can choose at least 6 of those more volatile forex pairs. Price Action setups instead of relay on lag indicators. But rsi for confirmation. Spread protection, position management, magic number editor, hours trading. Volatility protection Trailing Stop, Stop losses, take profit. Percentage and ATR scale instead of dollars or lot sizes. Funds management
Project Overview I am seeking an experienced MQL5 Expert Advisor (EA) developer to automate a systematic, multi-timeframe institutional trading framework specifically optimized for Spot Gold (XAUUSD) . The EA must programmatically map market structure, identify liquidity zones, and execute trades based on structural confirmations across three distinct timeframes: Daily (D1), 1-Hour (H1), and 15-Minute (M15) . Core
Writing of an Expert Advisor
30 - 200 USD
I want to find a Developer to perform this work and settle payments in this Application. I undertake not to communicate with Applicants anywhere else except this Application, including third-party messengers, personal correspondence or emails. I understand that violators will be banned from publishing Orders in the Freelance
I want to create a EA based on an existing EA.
100 - 500 USD
I want to create a EA based on an existing EA. I want to create a COPY of same EA. This is a Grid based EA and do averaging when market goes against it. While doing Averaging it keeps on taking trades and booking profits
Project information
Budget
100+ USD
Deadline
from 1 to 20 day(s)