Loading…

Set File Commentator

A .set file on its own is just NAME=VALUE pairs with no comments, no units, and no reminder of what a magic number, a lot-multiplier or a signal threshold actually controls once the tuning session that produced it is long forgotten. This script pairs a .set file with a small descriptions file (one ParamName=description text line per parameter) and writes an annotated document where every real parameter line is preceded by a wrapped comment block naming it and explaining it, in the same order the .set file has them in. The output is deliberately written with a .txt extension rather than overwriting the .set file. MetaTrader's own .set parser is not documented to skip comment lines, so treating the annotated file as a drop-in replacement that still loads in the tester or the input dialog would be an unverified claim - this is a reference document meant to be read next to the real .set file, not a replacement for it. Any line in the .set file that is not a NAME=VALUE line (already a comment, a blank line, a section marker some tools add) is passed through unchanged rather than dropped, so the output stays a faithful superset of the original structure. A parameter with no matching description is still annotated with a "no description provided" marker and counted separately in the summary, so gaps in the descriptions file are visible rather than silently skipped. Notes and limitations - The output is a reference document, not a loadable .set file. It is written with a .txt extension on purpose; loading it back through MetaTrader's own .set parser is not something this tool claims works. - A description line without an '=' in the descriptions file is skipped and counted, not guessed at. - A .set parameter is matched to its description by exact name (the text before the first '=' on each line). Whitespace differences or a renamed parameter will not match and will show as undocumented. - Only the first '=' on each line is treated as the key/value separator, so a .set value that itself contains '=' (rare, but possible in a comment-style value some tools write) is preserved intact.

Script · MT5 · v1.0 · Free

About Set File Commentator

Set File Commentator is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Set file, Descriptions file and Output file. MQL source code included.

Files in the download: SetFileCommentator.ex5, SetFileCommentator.mq5, SetFileCommentator.txt.

Settings

SettingDefaultWhat it does
Set file.set filename in MQL5\Files
Descriptions fileDescriptions filename in MQL5\Files (ParamName=text per line)
Output fileOutput filename in MQL5\Files (blank = auto)
Wrap column72Wrap description text at this many characters

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Buy/Sell Arrows · Trading Sessions · Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria