Terminal Path Reporter
New MQL4 users routinely confuse four different folders: the terminal program's install folder, this specific terminal instance's own data folder, the shared Common data folder used by every terminal install on the machine, and the fact that neither of the two writable Files sandboxes is the terminal's own history\ folder. This script reads all of it live from TerminalInfoString() - nothing is hardcoded, because a user's install drive, Windows username, and terminal instance number are all different from developer to developer, and are different again for a portable-mode install or a second copy of the same broker's terminal on the same machine. For each of the four locations it prints the path itself and a short plain-language explanation: which one is read-only, which one is private to this terminal instance, which one is shared across every MetaTrader 4 install on the account, and which two are the actual sandbox roots that FileOpen() (with and without FILE_COMMON) reads and writes into. It also explicitly calls out what MQL4 file functions cannot reach at all - most notably the terminal's own offline chart history folder, which a script can write a correctly-formatted file towards but never install into automatically. Notes and limitations - This is a read-only diagnostic tool. With InpWriteReportToFile left at its default it makes no changes to the filesystem at all. - The report reflects THIS terminal instance and THIS Windows user account at the moment it runs; it says nothing about any other broker's terminal or any other Windows profile on the same machine. - It does not and cannot report the path to the terminal's own history\<server>\ folder as a writable location - that folder is outside the MQL4 file sandbox entirely, and moving a generated file into it is a manual step outside what any MQL4 script can perform.
Script · MT4 · v1.0 · Free
About Terminal Path Reporter
Terminal Path Reporter is a script for MetaTrader 4. It has 1 setting, such as Write report to file. MQL source code included.
Files in the download: TerminalPathReporter.mq4, TerminalPathReporter.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Write report to file | false | Also save this report as TerminalPathReporter_Report.txt in the sandbox |
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: MT4 Script · MQL4 Source Code