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

Tarea técnica

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

Han respondido

1
Desarrollador 1
Evaluación
(22)
Proyectos
30
20%
Arbitraje
8
63% / 13%
Caducado
9
30%
Libre
2
Desarrollador 2
Evaluación
(12)
Proyectos
47
85%
Arbitraje
1
0% / 100%
Caducado
9
19%
Libre
3
Desarrollador 3
Evaluación
(325)
Proyectos
505
19%
Arbitraje
32
44% / 31%
Caducado
34
7%
Trabajando
4
Desarrollador 4
Evaluación
(168)
Proyectos
199
48%
Arbitraje
3
33% / 33%
Caducado
2
1%
Libre
5
Desarrollador 5
Evaluación
(2)
Proyectos
1
0%
Arbitraje
1
0% / 100%
Caducado
0
Libre
6
Desarrollador 6
Evaluación
(13)
Proyectos
13
38%
Arbitraje
1
0% / 100%
Caducado
1
8%
Libre
7
Desarrollador 7
Evaluación
(3)
Proyectos
3
33%
Arbitraje
0
Caducado
0
Libre
Ha publicado: 2 artículos
8
Desarrollador 8
Evaluación
(73)
Proyectos
83
64%
Arbitraje
5
100% / 0%
Caducado
9
11%
Libre
9
Desarrollador 9
Evaluación
(16)
Proyectos
35
23%
Arbitraje
4
0% / 50%
Caducado
2
6%
Trabaja
10
Desarrollador 10
Evaluación
(295)
Proyectos
473
40%
Arbitraje
103
41% / 23%
Caducado
78
16%
Ocupado
Ha publicado: 2 ejemplos
11
Desarrollador 11
Evaluación
(16)
Proyectos
20
0%
Arbitraje
10
0% / 80%
Caducado
6
30%
Libre
12
Desarrollador 12
Evaluación
(12)
Proyectos
16
13%
Arbitraje
4
50% / 25%
Caducado
4
25%
Trabaja
13
Desarrollador 13
Evaluación
Proyectos
1
0%
Arbitraje
1
100% / 0%
Caducado
0
Libre
Solicitudes similares
Pro EA 30+ USD
Hi, I want to build a trading robot specifically for passing a prop firm challenge. The EA should focus on strict risk management, low drawdown, and consistency suitable for prop firm rules. My current budget for this project is $30. Please let me know what is achievable within this budget and the strategy you recommend
Indicator Simple Moving Averages and Exponential Moving Average BUY SIGNALS SMA 7 High Crosses Above 20 EMA= LIME color Buy Signal at the low of next candle. SMA 7 High Crosses above 40 EMA= BLUE color Buy Signal at low of next candle. SMA 7 High Crossed above 200 EMA= YELLOW Color buy signal at the low of next candle. SELL SIGNALS SMA 7 Low Crosses below 20 Ema= LIME color Sell Signal at the high of next candle. SMA
I trade manually on M1 chart (XAUUSD) with fractals and alligator. When there is a price break on fractal (or some fractals that form a price level) or a price level created by multiple candles spikes, I enter 2 trades (0.02 lots), and 2 trades (0.04 lots). If I go in profit (5/10€), I close in profit. But if I go in loss with DD, at this point starts the management: every price level (important level) created by
Phahla fx boto 30+ USD
99.99% signal accuracy 10-15 trades distribution all currency trade and meta AI assistance on loss[advice] stop and start robot cyber security firewall protection activation code: 20060605TLP20 Please create a trading bot with any logo with the name elevation
Refine signal trigger execution . Optimize live chart performance . Ensure stable and clean code structure : Stable and clean code is important . Otherwise its a mess . Apply with as much accurate structure you foresee
RED DEVIL AI 30+ USD
50 EMA > 200 EMA → Uptrend confirmed Price pulls back to touch or cross below 50 EMA RSI > 50 ATR(14) > 20-period ATR average (volatility expanding) Current candle closes bullish ➡ Enter BUY at candle close50 EMA < 200 EMA → Downtrend Price pulls back to touch or cross above 50 EMA RSI < 50 ATR filter confirms volatility Current candle closes bearish ➡ Enter SELL at candle closeATR(14) Take Profit: 2.5 × ATR(14) This
This post is subject to developers response . Edit the post as you like . May be with me you can make a come back . So , , , Shift calculations . More to the calculation then you can comprehend is known . What else comes to your mind
Here is an example of Requirements Specification for the development of the MACD Sample Expert Advisor, which is available in the MetaTrader 5 standard package. 1. The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction. 2. Trend is determined based on the Exponential Moving Average with the specified period
Project Title Freedom ORB – Fully Automated MT5 Expert Advisor (ORB + Structure + Liquidity) (MT5) Project Description I require a fully automated MT5 Expert Advisor based on a structured Opening Range Breakout (ORB) model with market structure and liquidity confirmation. The EA must: Detect ORB session range Wait for breakout (close-based) Wait for retrace Confirm M1 structure + displacement Execute trade
I’m looking for a trading bot where I can use a balance of £1000 to make regular entries making £20-£40 per entry. obviously, I want to have minimum loss with a lot more profit being made

Información sobre el proyecto

Presupuesto
100+ USD
Plazo límite de ejecución
de 1 a 20 día(s)