MetaTrader 5 (.ex5)v2.00
RX-Aegis EA — install & usage guide
RX-Aegis is the TradingRx Expert Advisor for MetaTrader 5. It loads the Trading Plan you built on TradingRx, checks every trade against it in real time, warns or blocks before you break a rule, and sends violations to your dashboard timeline.
On this page
1. Requirements
- A TradingRx Pro plan (new accounts get Pro free for the first month).
- MetaTrader 5 desktop on Windows (or a Windows VPS). This build is .ex5 — MetaTrader 4 is not supported yet.
- A Trading Plan for the trading account in Plan Builder — without one the EA has nothing to enforce.
- Internet access from the terminal to https://www.tradingrx.net.
2. Install
- Download RX-Aegis.ex5 from Settings or Auto Sync (Pro only).
- In MetaTrader 5 open File → Open Data Folder, go to MQL5\Experts and copy RX-Aegis.ex5 there.
- In the Navigator panel right-click Expert Advisors → Refresh. RX-Aegis appears in the list.
- Open Tools → Options → Expert Advisors, tick “Allow WebRequest for listed URL” and add https://www.tradingrx.net. Without this the EA cannot reach TradingRx.
- Turn on the Algo Trading button in the toolbar so panel orders, breakeven, trailing and Enforce mode can act.
Only the .ex5 file is needed — the icon and all modules are compiled into it.
3. Attach and link to your TradingRx account
- Drag RX-Aegis onto any chart of the account you want to protect.
- In the dialog: Common tab → tick “Allow Algo Trading”. Dependencies tab → tick “Allow DLL imports” if you want the Copy link / Open web buttons (optional).
- Set the inputs (see section 7) — the defaults are fine to start, in Warn mode — and press OK.
- The panel shows “LINK: enter code XXXX-XXXX” (the code is also printed in the Experts tab).
- Press Open web (or Copy link and paste it in your browser). Without DLL imports, select the URL in the box next to the buttons and press Ctrl+C.
- On the TradingRx link page, sign in with Google, check the code, choose the trading account that matches your MT5 login and press Approve & link EA.
- Within a few seconds the panel switches to “WATCHING – plan active”.
- The link is stored per MT5 login. Switching to another login in the terminal loads that login's link and plan; link it once if it is new.
- To change TradingRx account: press Logout at the bottom right of the panel, then Confirm? within 6 seconds. The token is revoked and a new code is shown — no restart needed.
4. Compliance modes
| Mode | What it does |
|---|---|
| Observe | Records violations and sends them to your dashboard. Never interrupts you — good for the first week. |
| Warn (default) | Panel orders that break a hard rule are refused before they are sent, with the reason. Manual orders placed outside the panel trigger an alert right after they fill. |
| Enforce | Also closes positions that break a hard rule and locks the day when the daily loss or trade limit is hit. Only acts when the input InpEnforceConsent = true. Part of the Enterprise plan. |
5. What the EA checks from your Trading Plan
The EA uses the same rules as the dashboard plan scorecard. The plan is re-downloaded every 15 minutes (input InpPlanRefreshMinutes) and cached on disk, so it keeps working offline. After editing the plan on TradingRx, press R on the panel to reload it immediately.
| Plan rule | EA behavior |
|---|---|
| Max risk per trade (%) | Risk at the stop loss vs. start-of-day balance. Above the limit → hard violation. |
| Max daily loss (%) | Closed loss today above the limit → hard violation and the day is LOCKED. |
| Max trades per day | Opening more trades than allowed → hard violation and the day is LOCKED. |
| Min R:R | Planned R:R (needs SL and TP) below the minimum → soft warning only. |
| Allowed sessions | Trading outside your sessions → hard violation. |
| Allowed symbols | A symbol not in the plan (groups FX, METALS, CRYPTO, INDICES and broker suffixes are understood) → hard violation. |
| Cooldown after losses / wins | A losing or winning streak starts a COOLDOWN that blocks new trades for the configured minutes. |
| Require stop loss | A new trade without SL is a hard violation (input InpRequireStopLoss). |
6. Using the trading panel
- Header: R reloads the plan, – collapses the panel, drag the header to move it.
- Status bar: green WATCHING = plan active; yellow COOLDOWN = new trades blocked for a while; red LOCKED = daily limit reached, no more trades today.
- Account block: balance, equity, day P/L, floating P/L, 30-day win rate and average R:R.
- Plan block: your limits, whether you are IN SESSION, whether the chart symbol is allowed (OK / BLOCKED) and today's usage — it turns red at 80% of a limit.
- Lot / % button: in % mode the Lot box is risk % of balance and the lot is computed from SL points (shown on the BUY/SELL buttons). SL and TP are entered in points.
- BUY / SELL: market orders, pre-checked against the plan. Buttons turn grey while LOCKED or in COOLDOWN.
- Close All / Close Win / Close Loss / Close Sym: close positions in bulk.
- Breakeven moves SL to entry on winning positions of the chart symbol; Trail ON/OFF trails the stop by the points in the box.
- Pending orders: press Draw, click the chart for Entry, then for SL (SL below entry = buy, above = sell). If the R box (TP:SL ratio) is above 0 the TP is drawn for you, otherwise click a third time for TP. Drag the lines to adjust, press Place (limit/stop is chosen automatically and checked against the plan), Clear removes the drawing.
7. Main inputs
| Input | Meaning |
|---|---|
| InpMode | OBSERVE / WARN / ENFORCE (see section 4). |
| InpEnforceConsent | Must be true for ENFORCE to close positions. |
| InpRequireStopLoss | Treat a trade without SL as a violation (default true). |
| InpRestrictToChartSymbol | Only watch the chart's symbol instead of the whole account. |
| InpPlanRefreshMinutes | How often the plan is re-downloaded (default 15). |
| InpSessionGmtOffset | Hours added to GMT for the session windows (Asia 0–8, London 7–16, New York 12–21, Overlap 12–16 GMT). |
| InpAlertPopup / Push / Email | Where alerts go: terminal pop-up, MetaTrader mobile push, email. |
| InpReportToCloud | Send violations to your TradingRx dashboard (default true). |
| InpShowPanel, InpPanelX/Y | Show the panel and its starting position. |
| InpApiBaseUrl | Leave as https://www.tradingrx.net. |
8. Troubleshooting
| Symptom | Fix |
|---|---|
| Experts tab: “WebRequest BLOCKED” or error 4014 | Add https://www.tradingrx.net under Tools → Options → Expert Advisors → Allow WebRequest, then re-attach the EA. |
| Panel shows EXPIRED or DISABLED | Your Pro plan or trial has ended. Renew on the Billing page, then press R on the panel. |
| The link code expired | The EA requests a new code automatically — use the newest code on the panel. |
| No plan / limits are empty | Create a Trading Plan for this account in Plan Builder and make sure you linked the same account, then press R. |
| Copy link / Open web do nothing | Re-attach with “Allow DLL imports”, or select the URL in the box and press Ctrl+C. |
| Orders are refused | Read the reason on the message line: a plan rule, LOCKED or COOLDOWN. This is the EA doing its job. |
| Panel orders do nothing at all | Turn on Algo Trading in the toolbar and in the EA's Common tab. |
RX-Aegis supports your own Trading Plan discipline. It does not give signals and cannot guarantee profit or prevent every loss. Test it on a demo account first.