Expert Actions — User Guide

12 October 2026, 08:37
Pham
0
3

ExpertActions — User Guide

ExpertActions is a utility Expert Advisor for MetaTrader 5. It manages the Expert Advisors that run on the other charts of the same terminal: list them with all their inputs, restart them, remove them, load inputs from a .set file, save their inputs to a .set file and close charts. Everything runs from a small button panel, and also from your own Telegram bot.

Typical uses:

  • Restart every EA after you recompiled it, without opening each chart.
  • See the inputs of all running EAs in one place before a news event or after a VPS migration.
  • Apply a saved preset (.set) to a running EA, with a preview of every changed value.
  • Clean up a terminal with many charts: close one chart, all other charts, or only charts without an EA.
  • Check and restart your EAs from your phone through Telegram.

ExpertActions on the MQL5 Market: ExpertActions
Free demo (demo accounts only): download

Contents

  • 1. Installation
  • 2. The panel
  • 3. Functions
  • 4. Automatic run (VPS)
  • 5. Telegram control
  • 6. Inputs
  • 7. Add-on for buyers: Load EA and Algo Trading on/off
  • 8. Demo version
  • 9. Limits
  • 10. Troubleshooting

1. Installation

  • Buy and install ExpertActions from the MQL5 Market. It appears under Navigator → Expert Advisors → Market.
  • Open a separate chart (any symbol, any timeframe) and attach ExpertActions to it. This chart is the "control chart": ExpertActions never changes it. The only exception is the Close ALL button, which closes this chart too, last, after you confirm.
  • In the Common tab, tick Allow Algo Trading. MetaTrader 5 lets an EA restarted by another program trade only if that program may trade too. Without it, the panel warns: WARNING: Algo Trading is off for ExpertActions, EAs it starts cannot trade.
  • The status line of the panel shows Ready .

2. The panel

Part What it does
Title ExpertActions
X (top right) Removes ExpertActions itself from its chart. A dialog asks Remove ExpertActions from this chart? . The other charts and their EAs are not changed.
Grey line All charts except this one : the scope of every function.
6 buttons List, Restart, Remove, Change inputs, Close charts, Save inputs. The tooltip of each button says what it does.
Yellow status line Result of the last action, for example Restart: 1/1 done . Hover it for the full text; the Experts tab of the Toolbox has every detail.

Each button opens a list panel to the right of the main panel. Click a row to select it (it turns blue), hover a row to see its details, then click an action. The action applies to the one selected EA, file or chart. Lists with more than 10 rows have < Page a/b > buttons. The list is built when the panel opens: click the main button again to refresh it.

Safety: every action that changes or closes a chart shows a confirmation dialog with the list of charts or a preview of the changes. There is no input to turn this dialog off. If you click an action without selecting a row, the panel says Select an EA first. and nothing happens.

3. Functions

All functions work on all charts of the terminal except the chart that runs this ExpertActions. Another copy of ExpertActions on another chart is handled like any other EA.

List

Opens the list of Expert Advisors (only charts that run an EA) and prints into the Experts tab every EA with its symbol, timeframe, path and all input values. Hover a row in the panel to see the inputs. List itself changes nothing.

Restart

Select an EA → Restart → Yes. The EA runs OnDeinit and OnInit again with the same inputs. Use it after recompiling an EA or when an EA is stuck in a wrong state.

Remove

Select an EA → Remove → Yes. The EA is removed; the chart stays open with its indicators and objects.

Change inputs (load a .set file)

  • Select an EA → Change inputs. The panel lists the .set files in MQL5\Files\Presets (input InpSetFolder ).
  • Select a file → Apply. A preview shows each change as name: old -> new ; confirm to apply.
  • Only inputs with the same name are changed. Inputs not in the file keep their values. Names in the file that the EA does not have are listed as (not an input of this EA: ignored) .
  • If nothing would change, the panel says Nothing to change: same values, or no input of this EA in the file. and the chart is not touched.
  • .set files saved by MetaTrader 5 (UTF-16), UTF-8 and ANSI files are read. Strategy Tester files with || ranges work too: only the first value is used.

Save inputs

  • Select an EA → Save inputs. A small panel asks for a file name (suggested: EA_SYMBOL_TF ).
  • Click Save. The file is written to MQL5\Files\Presets\<name>.set in the same format as MetaTrader 5 presets. An existing file is never overwritten: the panel says Already exists: <name>.set .
  • Use the file later with Change inputs, with the Load button of the EA input dialog, or in the Strategy Tester.

Note: MQL5 lets an EA read and write files only inside MQL5\Files . That is why the presets live in MQL5\Files\Presets and not in MQL5\Presets . Copy files between the two folders when you need them there.

Close charts

Opens the list of all other charts (with or without an EA). Three buttons:

Button Closes
Close selected The selected chart
All but this Every chart except the ExpertActions chart
Close ALL Every chart. The ExpertActions chart is closed last and ExpertActions stops. The dialog starts with This chart (ExpertActions) is closed last: ExpertActions stops.

4. Automatic run (VPS)

Set InpAutoAction and ExpertActions runs that function once, without any dialog, InpAutoDelaySec seconds after it starts, on every EA or chart:

  • List EAs and inputs: prints all EAs into the Experts tab.
  • Restart EAs: restarts every EA on the other charts.
  • Remove EAs: removes every EA on the other charts.
  • Close charts without an EA: closes every empty chart.

Change inputs and Save inputs need choices in the panel and cannot run automatically. With InpAutoRemoveSelf = true , ExpertActions removes itself when the automatic run is done.

The automatic action runs again every time ExpertActions starts (terminal restart, input change, timeframe change of its chart). Do not run two copies of ExpertActions with Restart EAs at the same time: they would restart each other forever.

5. Telegram control

Control ExpertActions from one Telegram chat. It uses only the MQL5 WebRequest function (no DLL) and is off by default.

Setup

  • In Telegram, send /newbot to @BotFather, choose a name and copy the token.
  • In MetaTrader 5: Tools → Options → Expert Advisors, tick Allow WebRequest for listed URL and add https://api.telegram.org .
  • Paste the token into InpTgToken , keep InpTgChatId = 0 and attach ExpertActions. Send /start to your bot. The Experts tab shows Telegram: message from chat 123456789 ignored (InpTgChatId = 0) . That number is your chat ID.
  • Set InpTgChatId to that number. From now on only this chat can send commands and receive reports. Messages from other chats are ignored and logged.

Commands run at once, without confirmation. Numbers come from the last list the bot sent, and ExpertActions checks that the chart and its EA did not change since then. A command without its number, or with a wrong number, runs nothing: the bot replies with the usage line and a fresh list to pick from. Messages sent while the terminal was off are skipped when ExpertActions starts, so an old command never runs again.

Commands

Command What it does
/help All commands, with examples
/status Version, account, number of charts and EAs, Algo Trading state, automatic action
/list Numbered list of the EAs, for example 1. EURUSD H1 ExpertMACD
/inputs <n> Path and all inputs of EA number n
/restart <n|all> Restart EA n, or every EA
/remove <n|all> Remove EA n, or every EA
/sets Numbered list of the saved .set files
/change <n> <set number|name> Load a .set file into EA n; the reply lists every name: old -> new
/save <n> <name> Save the inputs of EA n to <name>.set
/charts Numbered list of the other charts, for example 1. XAUUSD D1 (no EA)
/close <n|others|all> Close chart n, every chart except the ExpertActions chart, or every chart

Examples: /list then /restart 2 ; /sets then /change 1 3 .

With InpTgNotify = true the chat also receives a message when ExpertActions starts or stops, and the result of the automatic run.

Keep your token private. Anyone with the token can read the messages of the bot (commands are still accepted only from InpTgChatId ). If it leaks, use /revoke at @BotFather. Use one token for one ExpertActions only. If InpTgChatId is a group, every member of the group can send commands.

6. Inputs

Input Default Meaning
Safety
InpApplyTimeoutMs 5000 Max wait for one chart (ms, min 500). Increase it on a slow or busy terminal
Input files
InpSetFolder Presets Folder of the .set files, inside MQL5\Files . Used by Change inputs and Save inputs
Automatic run
InpAutoAction None Function run once after start, without dialogs (List, Restart, Remove, Close charts without an EA)
InpAutoDelaySec 10 Delay after start (s)
InpAutoRemoveSelf false Remove ExpertActions after the automatic action
Telegram
InpTgToken (empty) Bot token from @BotFather. Empty = Telegram off
InpTgChatId 0 The only chat that may send commands. 0 = none (the chat ID of each sender is logged)
InpTgNotify true Send start/stop and automatic-run reports to that chat
Panel
InpShowPanel true Show the button panel
InpPanelX , InpPanelY 10, 25 Panel position (px)

7. Add-on for buyers: Load EA and Algo Trading on/off

Buyers of ExpertActions receive a free add-on build, ExpertActionsDLL. Contact me through MQL5 private messages after your purchase. It has every function of ExpertActions plus:

  • Load EA (7th button): scans MQL5\Experts on every click, then in 3 steps you pick an EA, a .set file (or the EA defaults) and the symbol and timeframe. ExpertActions opens a new chart running that EA, with the same permissions (Allow Algo Trading) as ExpertActions itself. Telegram: /eas and /load .
  • Algo Trading on/off from Telegram: /algo shows the state of the Algo Trading button of the terminal, /algo on and /algo off switch it. Turning it off stops trading of every EA of the terminal.

The add-on requires "Allow DLL imports" in the Common tab of the EA. It uses Windows system libraries only (kernel32, shell32, user32). It is not sold on the Market and does not run on the MQL5 VPS.

Note: /algo sends the same command as the Algo Trading toolbar button. MetaQuotes does not document this command, so it may not work on every MetaTrader 5 build. ExpertActions checks the result and replies Algo Trading not changed: ... when the state did not change.

8. Demo version

Try ExpertActions for free before you buy: download ExpertActionsDemo.ex5. Copy the file to MQL5\Experts (File → Open Data Folder), then refresh the Navigator.

  • Runs on demo accounts only. On a real account it stops with ExpertActions Demo runs on demo accounts only. The full version is on the MQL5 Market.
  • Works until 2027.06.30 (broker server time).
  • Functions: List, Restart, Remove, Close charts and the automatic run of these functions.
  • Not in the demo: Change inputs, Save inputs, Telegram control, Load EA.

9. Limits

  • MQL5 has no function to attach or remove an EA on another chart. ExpertActions saves the chart template, edits the EA part and applies the template again. Restart and Change inputs therefore also recreate the indicators of that chart.
  • An EA restarted or changed by ExpertActions can trade only if Allow Algo Trading is ticked for ExpertActions.
  • .set files and templates do not store the input types: Change inputs copies the values as written in the file. Read the preview, and check the EA with List after loading.
  • In the Strategy Tester, ExpertActions does nothing.
  • Telegram commands run without confirmation: always send /list or /charts first and check the number.

10. Troubleshooting

Message What to do
no EA on the other charts No other chart runs an EA. Use Close charts to see all charts
template not applied within N ms The terminal is busy. Increase InpApplyTimeoutMs
Select an EA first. Click a row in the list panel before you click an action
<EA> is no longer on that chart. Reopen the list. The EA changed since the list was opened. Click the main button again
No .set file: MQL5\Files\Presets is missing or empty (error N) Save a file with Save inputs, or copy .set files into that folder
WARNING: Algo Trading is off ... Turn on Algo Trading on the toolbar and in the Common tab of ExpertActions
WebRequest is not allowed: add https://api.telegram.org in Tools > Options > Expert Advisors Add that URL, then attach ExpertActions again
Telegram getUpdates failed: HTTP 401 ... Wrong token. Copy it again from @BotFather
Telegram getUpdates failed: HTTP 409 ... Another program (or another ExpertActions) uses the same token
Telegram getUpdates failed: network error 1003 ... Telegram cannot be reached from this computer. Open https://api.telegram.org in a browser on the same computer; if it is slow or blocked, use a VPN or a VPS
Telegram: message from chat N ignored (InpTgChatId = M) The message came from another chat. If it is you, set InpTgChatId = N
The list changed since it was sent. Charts or EAs changed. The bot sent a new list: pick again

Questions or problems: send me a private message on MQL5 with the lines of the Experts tab that start with ExpertActions .