Alert Inbox Trade Panel
AlertCenterAggregator.mq4, published elsewhere in this catalogue, established a shared alert bus: any tool can publish a signal as one global variable named ALERT_<Source>_<Slot>_<Severity>_<Message>, with the publish time as the variable's numeric value. This panel is the tradable counterpart - it reads that same bus, deduplicates on (Source, Message) exactly as the aggregator does, drops anything not seen again within InpStaleMinutes, and gives every surviving row its own Trade button. The base convention only carries free text in Message, which is not enough to size and route a real order safely. This panel documents and uses a small addendum any publisher can adopt: a message of the form SYMBOL~BUY|SELL~StopPips, e.g. EURUSD~BUY~30. A row whose message parses this way gets a live BUY/SELL button; anything that does not still appears in the inbox (nothing from the shared bus is hidden) but shows "n/a" and cannot be clicked, so a free-text informational alert is never mistaken for a trade signal. A click sizes the order from InpRiskPercent of current equity against the parsed stop distance, read from the symbol's live tick value - the same percentage risk on EURUSD or on gold, never a fixed lot. Before sending, the panel checks for an existing open position on that symbol under its own magic number and refuses to double up. After a successful send the row is marked DONE and its button disabled, so a slow double-click cannot fire the same alert twice; if the same content is republished later it becomes tradable again. Notes and limitations - Only messages following the SYMBOL~BUY|SELL~StopPips addendum are tradable from this panel; this is a deliberate restriction, not a parsing gap - free text alone cannot safely specify a real order. - Orders are sent as plain market orders with a stop at the parsed distance; no take-profit is attached. - DONE status is tracked locally in this panel's own memory and resets if the EA is removed and reattached; the underlying global variable itself is never deleted by this panel, since it belongs to its publisher. - This panel never deletes or overwrites another tool's global variables - it only reads the ALERT_ bus. - On a netting account, the panel cannot hold two independent positions on the same symbol from two different tradable alerts; the second is treated as already covered and marked DONE without being sent. Traders who need genuinely independent positions per alert on the same symbol should run this panel on a hedging account.
Expert advisor · MT5 · v1.0 · Free
About Alert Inbox Trade Panel
Alert Inbox Trade Panel is an expert advisor (trading robot) for MetaTrader 5. It can size trades from your balance and risk percent. It has 13 settings, such as Max rows, Stale minutes and Refresh secs. MQL source code included.
Files in the download: AlertInboxTradePanel.ex5, AlertInboxTradePanel.mq5, AlertInboxTradePanel.txt.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Max rows | 10 | Maximum inbox rows shown |
| Stale minutes | 60 | Drop an alert from the inbox this many minutes after it was last (re)published |
| Refresh secs | 2 | Inbox refresh interval, in seconds |
| Risk percent | 1.0 | Percent of equity risked per one-click trade |
| Default stop pips | 30 | Fallback stop distance if a row's own stop cannot be parsed |
| Magic number | 20260384 | Magic number for orders placed by this panel |
| Slippage pips | 3 | Slippage tolerance, in pips |
| Max retries | 5 | Attempts per order before giving up |
| Retry wait ms | 500 | Pause between attempts, milliseconds |
| Corner | CORNER_LEFT_UPPER | Panel corner |
| X offset | 10 | Horizontal offset from the corner, in pixels |
| Y offset | 20 | Vertical offset from the corner, in pixels |
| Publish demo | false | Publish one tradable demo alert on attach, symbol = chart symbol |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: Buy/Sell Arrows · Alerts · Risk & Lot Size · MT5 Expert Advisor · MQL5 Source Code