Termos de Referência
I am looking for an experienced MQL5 developer to create a custom indicator (not an EA, no auto-trading) for MetaTrader 5 with the following exact requirements:
1. Analysis & Signal Generation
- Use Moving Average crossover (configurable fast/slow MA, e.g., EMA 9/21 or 50/200) as the main signal trigger.
- Add RSI filter (period 14, configurable levels, e.g., Buy when RSI > 50 or < 30 for oversold confirmation, Sell opposite).
- Generate signal only when both MA crossover and RSI condition are aligned.
- Optional multi-timeframe confirmation (e.g., M15 signal must match H1 trend).
- Works on any symbol, optimized for XAUUSD.
2. On-Chart Visualization
- Draw Buy/Sell arrows when a signal triggers.
- Draw horizontal lines for SL and TP1/TP2/TP3:
- SL in pips (input SL_pips, e.g. default 50 pips).
- TP1/TP2/TP3 in pips (inputs TP1_pips, TP2_pips, TP3_pips, e.g. 100/200/350) or optional ATR(14) multiplier converted to pips.
- Show labels on lines: price level, pips distance, RR ratio, suggested partial close (e.g. close 40% at TP1, 30% at TP2).
3. Telegram Integration
- Send real-time alert when a new signal appears (only once per signal).
- Support emojis, new lines (\n), and parse_mode=MarkdownV2 (or HTML) for formatting (bold/italic if needed).
- Use separate emojis for Buy/Sell: 🟢 for Buy, 🔴 for Sell.
- Exact message format (with historical signal winrate right after the signal title):
**🚨 BUY SIGNAL XAUUSD M15 Winrate 80%**
🟢 Entry: 2850.50 SL: 2845.50 (-50 pips | Risk 1%)
TP1: 2860.50 (+100 pips | RR 1:2)
TP2: 2870.50 (+200 pips | RR 1:4)
TP3: 2885.00 (+350 pips | RR 1:7)
Time: 2026-03-02 03:00
- If not enough historical matches (e.g. less than 10), show “Winrate: Calculating...” or “Winrate: N/A”.
- Optional advanced feature (preferred if developer has experience): Send chart snapshot as photo via sendPhoto API (using ChartScreenShot function), with the above format as caption.
- Inputs: Bot Token, Chat ID, enable/disable winrate in message, parse_mode selection (MarkdownV2/HTML/None).
4. Historical Signal Winrate Calculation
- When a new signal is generated, save its timestamp, type (Buy/Sell), suggested entry price, and symbol (using simple CSV file or internal storage).
- Scan closed trades from history (using HistorySelect and HistoryDealGetTicket) and match to previous signals:
- Match if open time is close to signal time (± a few minutes), same symbol, same direction.
- Win/Loss rule:
- WIN if the matched closed trade has profit > 0 (i.e. hit at least TP1 or any profit, including partial closes or trailing).
- LOSS if profit ≤ 0 (hit SL or loss).
- Winrate = (number of WIN matches / total matches) × 100%.
- This winrate is displayed in the Telegram message and on the chart dashboard.
5. On-Chart Dashboard
- Display a movable panel showing:
- Daily/Weekly/Monthly summary: total pips profit/loss, number of trades, winrate %, profit factor.
- Signal winrate: “Signal Winrate: XX% (based on Y historical matches – win if TP1+ hit)”.
- Update in real-time when new trades close or on timer.
- Inputs: enable/disable dashboard, position on chart, symbol filter (XAUUSD only or all).
6. Profitability Requirement
- Logic must be conservative and non-repainting.
- Developer must optimize in MT5 Strategy Tester (genetic algorithm preferred) using 3–5 years of high-quality tick data.
- Target metrics: Profit Factor > 1.5, Max Drawdown < 20–25%, Win Rate > 55%, steadily rising equity curve.
- Provide full backtest report (.htm or screenshots) and optimized parameter set.
General Requirements
- Full source code (.mq5) – no compiled files only.
- All key settings available as inputs (SL/TP pips, MA/RSI periods, Telegram, dashboard, min matches for winrate, etc.).
- Add MT5 popup/sound alerts as fallback.
- Compatible with latest MT5 builds.
Budget & Milestones
- Milestones:
- Core signal logic + SL/TP in pips + chart display (demo version).
- Telegram integration with formatted message (including winrate, emojis, bold, optional photo).
- Dashboard with summaries + historical signal winrate calculation + optimization + final polish.
Please share your portfolio with similar indicators (especially those that calculate winrate from historical trade matches, include it in Telegram alerts, and support formatted messages with emojis/bold).