Guide version 2.3, December 2026, for Shepherd Pilot 1.00 as corrected on 5 December (MQL5 Market edition).
Shepherd Pilot is an Expert Advisor for MetaTrader 5, built for gold (XAUUSD). It analyses the market, hands its report to the AI model you choose, draws the proposed trading plans on the chart, then places and manages the orders according to your settings. Everything is in one program.
Risk warning. Margin trading (gold, currencies, CFDs) carries a high risk of loss: you can lose all the capital you commit. Shepherd Pilot is a decision-support tool: its analyses and the plans proposed by the AI are neither investment advice nor a promise of profit. Past results do not guarantee future results. You alone remain responsible for your settings and your orders, including in automatic mode. Start on a demo account.
1. What you need
| Item | Why | Cost |
|---|---|---|
| MetaTrader 5 and an account with a broker that offers gold | Shepherd Pilot runs in MT5 (not MT4) | Free |
| A demo account for your first days | Learn without risk | Free |
| An OpenRouter API key (it starts with sk-or- ) | The AI writes the plans through it | From $0.005 to $0.45 per analysis, depending on the model |
| A Telegram bot (optional) | Receive orders, closes and summaries on your phone | Free |
| A computer that stays on, or a VPS (recommended) | The EA only works while MT5 is open | Varies |
Create your OpenRouter key
- Create an account at openrouter.ai.
- Add a few dollars of credit (Credits menu). Bank cards and other payment methods are accepted.
- Keys menu, then New key: give it a name and click Create. Copy the key and keep it secret: anyone who has it can spend your credit.
Create your Telegram bot (optional)
- In Telegram, open @BotFather, send /newbot and answer the questions. BotFather gives you the bot token.
- Open the chat with your new bot and send it /start , otherwise it cannot write to you.
- To find your chat ID, write to @userinfobot: it replies with your number.
2. Install
- In MT5, open the Market tab, then Purchased, and click Install.
- The EA appears in the Navigator window, under Expert Advisors → Market.
3. Allow MT5 to connect (required)
Menu Tools → Options, Expert Advisors tab:
- Tick "Allow algorithmic trading".
- Tick "Allow WebRequest for listed URL", then add the addresses below, one per line, exactly as written.
- Click OK.
https://query1.finance.yahoo.com
| Address | What it is for |
|---|---|
| openrouter.ai | The AI |
| api.telegram.org | Telegram messages (if you use them) |
| query1.finance.yahoo.com | The US 10-year yield, read by the analysis |
Optional: https://router.requesty.ai , if you enter a Requesty key as a fallback provider (used only when OpenRouter does not answer).
4. Start Shepherd Pilot on the gold chart
- Open an XAUUSD chart, on M15 to begin with. The symbol name depends on the broker: XAUUSDm, GOLD…
- Drag Shepherd Pilot from the Navigator onto the chart.
- Common tab: tick "Allow Algo Trading".
- Inputs tab: the settings are sorted into groups (GENERAL, GOLD, AI). Fill in at least:
| Group | Setting | What to enter |
|---|---|---|
| GENERAL 01 - Interface & language | Interface language / Langue / Idioma | English (default), Francais or Espanol: the panel, the messages and the AI's answers follow it |
| GENERAL 02 - Telegram connection | Telegram bot token and Telegram chat ID | Those of your bot (optional) |
| GENERAL 08 - Orders - placed from plans A and B | Order placement | Off to begin with (see section 6) |
| GENERAL 08 - Orders - placed from plans A and B | Risk profile | Careful to begin with (see section 8) |
| AI 02 - AI analyst (OpenRouter) | OpenRouter API key (sk-or-...) | Your key |
| AI 02 - AI analyst (OpenRouter) | AI model | Claude Sonnet 5.5 (default, balanced), or another model from the list |
- Click OK. The SHEPHERD PILOT panel appears in the top-left corner of the chart.
The first-launch warning
The first time the EA runs on a trading account, the panel shows a risk warning. Read it, then click "I have read and understood": it will not come back on that account. The EA is already working normally in the meantime.
5. The panel at a glance
Title bar: i (information), – (collapse to the title bar), × (hide). The P key on your keyboard hides or shows the panel.
Status lights, always visible:
| Light | Green | Amber | Red or grey |
|---|---|---|---|
| Telegram | Session open: trades are announced | — | Session closed: nothing is sent |
| News | Clear | Release imminent | Cooldown after a release |
| Analyst | Plans received from the AI | Analysis in progress, or no report sent yet | No answer from the AI |
Lines starting with "!" tell you what keeps the EA from working, with the fix (see section 10).
ANALYSIS section: the bias (D1, H4, H1), the open sessions and the last report. Buttons:
- REPORT: recalculate everything and send a report to the AI, which answers with plans;
- Refresh: recalculate the analysis without sending a report (no AI cost);
- News: pause or resume the news engine for this session.
PLANS section: plans A and B (direction, entry price, strength STRONG / MEDIUM / WEAK, state), the AI model used, and the Orders line (chosen mode and number of live orders). Buttons: show or hide Levels, Plan A, Plan B; ↻ reloads the plans. In On confirmation mode, a PLACE A or PLACE B button appears next to each plan.
MANAGEMENT section: the SL/TP manager, positions and account. Buttons: Telegram ON/OFF (the session starts OFF), Screenshot, Summary (of the day) and Status (of the account and the EA), sent to Telegram.
On the chart, with the default colours: plan A entry in orange, plan B entry in blue, stop loss in red, take profit in green, plain levels in grey.
6. First analysis
- Click REPORT.
- Wait 30 seconds to 2 minutes while the AI reads the report and answers. The panel may stop responding during that time. This is normal: the EA is waiting for the answer.
- Plans A and B (entry, stop, targets) are drawn on the chart and listed in the PLANS section.
- What happens next depends on the Order placement setting:
- Off: you read the plans and decide yourself;
- On confirmation: you click PLACE A or PLACE B to send the orders;
- Automatic: the orders are sent on their own, and Telegram tells you.
Plans are always placed as pending orders (limit, stop or stop limit), never at market. The EA does not place a plan whose entry has already been touched since the analysis. It does not place an analysis older than 30 minutes either (adjustable). A pending order that has not triggered is deleted after 4 hours (adjustable, or never).
7. Going automatic
- Group GENERAL 03, setting Report: choose Automatic + button. By default, the EA then asks for an analysis:
- when its engine's signal becomes valid;
- 15 minutes after the London and New York kill zones open;
- at most 4 times a day, at least 60 minutes apart, and never while one of its positions is open.
Other triggers exist, all off at first: session entry (Tokyo, Frankfurt, London, New York), session overlaps, fixed times, and after a news release that moved the market (groups GENERAL 03 to 07). 2. Group GENERAL 08, setting Order placement: choose Automatic once you trust it.
Times are set in GMT winter time; summer time is handled automatically. Enter your own offset from GMT in GENERAL 04.
Each automatic analysis is billed by OpenRouter according to the chosen model. The Maximum analyses per day setting (group AI 02, 20 by default) caps the spending.
8. Choose your risk profile
Group GENERAL 08, setting Risk profile:
| Profile | Risk per plan | Plans placed | Minimum R:R | Orders at most |
|---|---|---|---|---|
| Careful | 0.5 % | The stronger plan only | 1.5 | 2 |
| Normal | 1 % | A and B | 1.0 | 6 |
| Aggressive | 2 % | A and B | 0.8 | 10 |
| Custom (default) | The GENERAL 08 settings, as they are |
A profile always sizes the volume as a percentage of the balance. In Custom, you can choose a fixed lot.
9. How the EA protects you
- High-impact news (NFP, inflation, rates…):
- 35 minutes before: no automatic report and no new order (a plan received is kept for later). Pending orders are moved away from the price, and positions without a stop or already in profit are closed. Losing positions are kept unless you change the setting;
- 15 minutes after: pending orders are put back at their price. They are deleted if their entry, stop or target was touched in the meantime.
- This applies to the chart's symbol: the EA's orders and your manual orders. Never another robot's orders, nor those on another symbol.
- No late entries: a plan whose entry has already been touched is not placed.
- Lifetime of pending orders: 4 hours by default.
- Limited number of orders on the symbol (6 by default, or according to the profile).
- SL/TP manager (optional, off at first, group GENERAL 10): secures and trails your positions in one of three styles, Aggressive, Patient or Cascade.
The trades closed by the EA are recorded in Common\Files\ShepherdPilot\stats.csv , in the MT5 common data folder.
In the Strategy Tester, MT5 blocks Internet calls, so the AI cannot be consulted. The EA therefore places orders from its own engine's signal. These results do not represent the AI's plans. The Market demo version also runs only in the tester. If your broker's server time is not GMT, set the offset in GENERAL 29.
10. Troubleshooting
| What you see | Likely cause | Fix |
|---|---|---|
| "! MT5 « Algo Trading » button is off" | The MT5 toolbar button is off | Click it: it must be green |
| "! Algo trading not allowed for the EA" | Box not ticked at launch | Press F7 on the chart (EA properties), Common tab |
| "! The AI does not answer" | OpenRouter key missing or wrong, credit used up, or address not allowed | Check the key and credit at openrouter.ai, then section 3 |
| "WebRequest" message in the Experts tab | Address not allowed | Redo section 3 |
| "! Order placing is off" | Off mode chosen | Normal if intended; otherwise change the setting (section 6) |
| "Plan A rejected: …" in the log | The plan no longer meets a rule (entry already touched, R:R too low, margin…) | Normal: the EA is protecting you |
| No Telegram message | Wrong token or chat ID, /start not sent to the bot, or session OFF | Check all three, then click Telegram ON |
| The panel stops responding for a minute | An analysis is in progress | Wait: the EA is waiting for the AI's answer |
The log is at the bottom of MT5, Experts tab. Send a copy of it with your support request.
11. Need help?
Use the Comments tab of the product page on the MQL5 Market, or send a private message to the seller on MQL5.


