Triggering Manual Strategy Tester Orders with Command Files
Summary
This MetaTrader 5 article describes a way to trigger manual orders while an expert advisor runs in Strategy Tester. Since the author says chart events do not work there for detecting button clicks, the EA instead checks a shared files folder on each tick. The presence of a designated empty file signals a buy, sell, or close action; after handling a command, the EA removes the command files. An external application or other process must place the files in the expected folder.
The approach is a simple bridge between an external control panel and an EA, and the article notes that file contents could carry additional inputs such as stop loss, take profit, or position size. It also warns that commands should appear one at a time because multiple files may be processed in read order. The article gives no code-level safeguards, execution tests, or discussion of stale commands, file access failures, or duplicate orders, so those behaviors need independent handling before practical use.
Key ideas
- The EA polls a shared folder for files that represent manual trade commands.
- Separate file names trigger buy, sell, or close actions, and the EA deletes command files after processing.
- An external application or process must create or transfer the command file.
- The author advises placing only one command file at a time to avoid ambiguous processing.
- File contents could carry order parameters, but the article does not describe safeguards or test results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.