Senior MQL5 Expert: Risk-Free Execution Logic (40/30/30)

Техническое задание

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. |

Откликнулись

1
Разработчик 1
Оценка
(22)
Проекты
30
20%
Арбитраж
8
63% / 13%
Просрочено
9
30%
Свободен
2
Разработчик 2
Оценка
(12)
Проекты
47
85%
Арбитраж
1
0% / 100%
Просрочено
9
19%
Свободен
3
Разработчик 3
Оценка
(328)
Проекты
511
19%
Арбитраж
33
45% / 30%
Просрочено
34
7%
Загружен
4
Разработчик 4
Оценка
(168)
Проекты
200
48%
Арбитраж
4
25% / 50%
Просрочено
2
1%
Работает
5
Разработчик 5
Оценка
(2)
Проекты
1
0%
Арбитраж
1
0% / 100%
Просрочено
0
Свободен
6
Разработчик 6
Оценка
(13)
Проекты
13
38%
Арбитраж
1
0% / 100%
Просрочено
1
8%
Свободен
7
Разработчик 7
Оценка
(3)
Проекты
3
33%
Арбитраж
0
Просрочено
0
Свободен
Опубликовал: 2 статьи
8
Разработчик 8
Оценка
(74)
Проекты
84
64%
Арбитраж
5
100% / 0%
Просрочено
9
11%
Свободен
9
Разработчик 9
Оценка
(16)
Проекты
35
23%
Арбитраж
4
0% / 50%
Просрочено
2
6%
Работает
10
Разработчик 10
Оценка
(296)
Проекты
475
40%
Арбитраж
105
40% / 24%
Просрочено
80
17%
Занят
Опубликовал: 2 примера
11
Разработчик 11
Оценка
(16)
Проекты
20
0%
Арбитраж
10
0% / 80%
Просрочено
6
30%
Свободен
12
Разработчик 12
Оценка
(13)
Проекты
18
11%
Арбитраж
4
50% / 25%
Просрочено
4
22%
Загружен
13
Разработчик 13
Оценка
Проекты
1
0%
Арбитраж
1
100% / 0%
Просрочено
0
Свободен
Похожие заказы
Looking for experience profitable manual traders that will be willing to trade my live mt5 account for profit share. Requirements Must have at least 6 months of profitable months. Min 10 percent monthly Send me investor credentials for mt5 or mt4 account. Can be trading Any instruments. Must reply with mt5 credentials or will disregard
Title: Advanced Manual Hedge EA with Multiplier & Multiple Trade Support Project Requirements: I need a professional Expert Advisor (EA) for XAUUSD and Forex to manage manual trades with the following logic: Lot Multiplier: The EA must automatically detect my manual trade size. There should be a "Multiplier" input (e.g., 3.0). If I open 1.0 lot Buy, the EA must auto-place a 3.0 lot Sell Stop at the set Gap
Prev day high and low indicator Profitable EA Please read everything before applying Indicator: Prev day high and low indicator by Electrified on tradingview Mentor: Wondafx on Youtube ( https://www.youtube.com/channel/UC-10_EKxVcFXY58jPSsp9fQ )(watch all his videos if needed) Watch this youtube video that explains how strategy works ( https://www.youtube.com/watch?v=HHUXBjgrrxo ) Currency pairs: EURUSD, GBPUSD
Hello, I am looking for a professional programmer to build an EA that can be able to take trades effectively in the correct direction with adequate indices that can help to predict the market move in advance. The EA will also be able to manage multiple trades to ensure that profits activated are closed before any major market reversals. The EA will have a maximum of 3 price indices at the start, and then the
i need a developer who can link my EA to AI and in the same time i want to make a crm and a bot for onboarding clients automatically to the telegram channel
I need an Expert Advisor (EA) programmed and designed to help me with trading. Requirements: * The programmer must have experience in implementing software projects. * The code must be high-quality, clean, clear, and editable at any time, with ownership of the code provided. * It must work on MT4 and MT5 platforms. * The maximum project completion time is 3 days. * The programmer must be cooperative and flexible
I am looking for an experienced MQL5 developer to complete the optimization and structural refinement of an existing MT5 Expert Advisor (source code ~2.5MB). Phase 1 (audit and baseline testing) has already been completed. The remaining work focuses on correcting core system behavior without changing the strategy. Key issues identified: • Scenario gate logic is not correctly structured at the entry decision level •
I am looking for an experienced MQL5 developer to build a fully automated MT5 Expert Advisor based on Session Breaks and Inverted Fair Value Gap (iFVG) logic. The EA must be coded professionally, optimized for backtesting, and written with clean, organized inputs and modular code. Core Strategy The EA should: Mark previous session highs and lows Wait for the current session to break the previous session high or low
IF ANYONE IS INTERESTED IN GETTING ANY KIND OF CUSTOM BOT FOR TRADING I WILL ADD THE STRATEGIES ACCORDING TO YOUR CHOICE MINE BEST BOT IS SCALPING AND HEDGING BOT YOU CAN CONTACT ME FOR SERVICES
I trade ES futures on the Ninja trader platform. I recently came across an indicator and wanted to check with you if you can build a similar indicator that works on Orenko or Ninja renko charts, and also combines support and resistance untouched. Below is the indicator, which will tell you market chop and to avoid. I want to include a support and resistance bar on the chart when there is no chop please let me know

Информация о проекте

Бюджет
100+ USD
Сроки выполнения
от 1 до 20 дн.