Runbook Trigger Board
During a stressful event - a bad news spike, a connection drop, a runaway EA - the last thing worth trusting is remembering the exact right sequence of manual clicks. This EA puts five fixed procedures on the chart as buttons: Close All Market, Cancel All Pending, Flatten + Disable, Clear Disable Flag, and Snapshot Account. Every procedure is read-only about what it CAN do - it only closes, cancels, flags or records, and never opens a new trade. The two destructive procedures (Close All Market, Flatten + Disable) require two clicks within a short confirmation window rather than firing on the first click, so a single mis-click during a stressful moment does not itself become the incident. Every execution - which procedure, what it touched, how many succeeded or failed - is appended to an audit log, so "did the panic button actually work" has a paper trail rather than a memory. Flatten + Disable also sets a global variable (GlobalVariableSet, named "RTB_TradingDisabled_<symbol>") that any cooperating EA can check with GlobalVariableCheck() before opening a new trade. This EA does not enforce that flag on anyone else's behalf - it is advisory infrastructure other programs opt into reading. Notes and limitations This EA never opens a trade under any circumstance - every procedure only closes, cancels, flags, or records. The trading-disabled flag it sets is advisory only; it has no effect unless another EA is written to check it. Close All Market uses a collect-tickets-then-act pattern so a failed close partway through does not cause the backwards loop to skip an order the pool re-indexed underneath it.
Expert advisor · MT4 · v1.0 · Free
About Runbook Trigger Board
Runbook Trigger Board is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Magic filter, This symbol only and Confirm window secs. MQL source code included.
Files in the download: RunbookTriggerBoard.ex4, RunbookTriggerBoard.mq4, RunbookTriggerBoard.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Magic filter | 0 | 0 = act on every order on this symbol regardless of magic; otherwise only this magic |
| This symbol only | true | true = procedures only touch orders on the chart's own symbol; false = every symbol |
| Confirm window secs | 4 | Seconds a destructive button stays armed after first click, before it needs re-arming |
| Slippage pips | 5 | Slippage tolerance when closing market orders, in pips |
| Panel x | 10 | Panel X offset, pixels from the corner |
| Panel y | 20 | Panel Y offset, pixels from the corner |
| Log file | RunbookTriggerBoard.csv | File written under MQL4\Files\ |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: News Trading · Alerts · MT4 Expert Advisor · MQL4 Source Code