Ranked Signal Queue Manager
Any EA with a "maximum concurrent positions" cap has to decide what happens to a signal that fires while every slot is already taken. The usual answer is nothing - the signal is evaluated once, found no room, and discarded. That throws away information: a strong signal that arrived one tick too late gets the same fate as a weak one, and whichever signal happens to fire right as a slot frees up gets the trade, whether or not it was actually the best opportunity available at that moment. This EA queues instead of discarding. When the position cap is full and a new signal fires, it is ranked by how strong it was (how far past its trigger threshold the reading went) and added to a queue. As soon as a slot frees up - a position closes, or the cap simply was not full to begin with - the single highest-ranked signal still in the queue is released and traded, not the oldest one and not just whichever fires next. A queued signal that goes unfilled for too long expires rather than sitting stale indefinitely waiting for a slot. The signal source used here - an RSI extreme-and-reversal check across a configurable symbol list - is deliberately simple. It exists to demonstrate the queue-and-release discipline, which is the actual point of this submission; the ranking and release machinery is independent of where the signal strength score comes from and works the same way with any stronger signal substituted in. Notes and limitations - The RSI signal is intentionally basic and is not tuned for edge - this is a queue manager submission, not a signal-quality submission. - Releases one signal per tick at most, even if several slots free up at once; a burst of closes empties the queue over a few ticks rather than firing several OrderSend calls back to back on the same tick. - If a symbol already carries an open position from this EA when a fresh signal for the same symbol would otherwise queue, the new signal is skipped rather than queued or stacked. - A signal already in the queue that is overtaken by a manual or other- source position on the same symbol is skipped at release time rather than forced through. - Queue state (which signals are waiting, and their rank) lives only in memory for the lifetime of this EA instance - removing it from the chart or restarting the terminal clears the queue.
Expert advisor · MT5 · v1.0 · Free
About Ranked Signal Queue Manager
Ranked Signal Queue Manager is an expert advisor (trading robot) for MetaTrader 5 based on RSI. It has 12 settings, such as Symbol list, Max concurrent and Rsi period. MQL source code included.
Files in the download: RankedSignalQueueManager.ex5, RankedSignalQueueManager.mq5, RankedSignalQueueManager.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 |
|---|---|---|
| Symbol list | EURUSD,GBPUSD,USDJPY,AUDUSD,USDCHF | Comma-separated symbols to watch |
| Max concurrent | 3 | Maximum simultaneous open positions across all symbols |
| Rsi period | 14 | RSI period used for the example signal |
| Rsi oversold | 30.0 | RSI below this + turning up queues a buy signal |
| Rsi overbought | 70.0 | RSI above this + turning down queues a sell signal |
| Signal expiry bars | 20 | A queued signal older than this many bars is dropped |
| Lot size | 0.10 | Lot size for every release |
| Stop loss pips | 40 | Stop-loss in pips, 0 = none |
| Take profit pips | 80 | Take-profit in pips, 0 = none |
| Magic | 27002 | Magic number for this EA's own trades |
| Slippage pips | 5 | Slippage tolerance in pips |
| Max retries | 5 | Order-send attempts before giving up on a release |
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 · RSI · MT5 Expert Advisor · MQL5 Source Code