Loading…

Parameter Sensitivity Mapper

An optimisation run produces a table: one row per tested parameter value, one performance figure per row. The value that scored highest is not automatically the value worth using - if that single best row is surrounded by much worse neighbours, small differences in the tested data (a different date range, a different broker's spread) could easily have produced a completely different winner. That pattern is the signature of curve-fitting to noise. A parameter that performs similarly across a range of nearby values - a plateau - is far more likely to reflect something real about the market. This tool automates that comparison. It reads a two-column CSV of parameter value and performance metric, sorts it, and for the value actually chosen for live use, compares its score against the average of its immediate neighbours. A deviation beyond a configurable threshold is reported as a spike; anything smaller is reported as a plateau. Every row gets the same treatment in the written report, not just the chosen one, plus a whole-surface roughness figure that flags a generally noisy result independent of which single row was picked. MQL4 cannot re-run MetaTrader's own optimiser from inside an EA, and this file does not pretend to. It reads the results the trader already generated with the real Strategy Tester and does the part an EA can do honestly: the arithmetic of comparing real numbers to their real neighbours. Notes and limitations - This tool only compares numbers already in the file; it has no way to know what the metric actually measures. Feed it net profit, profit factor, or any other single figure the tester reported - whichever one matters to the decision being checked. - A row at either end of the sorted list has fewer neighbours than InpNeighborWindow calls for; the average is still computed from whatever is available, and a genuinely edge-of-range row with no neighbour on one side at all is reported as "cannot classify" rather than guessed at. - The sparkline in the Comment panel uses plain ASCII characters rather than Unicode block glyphs, since not every chart font renders the latter reliably. - Read-only. It never sends, modifies or closes an order - only file reads and file writes are used.

Expert advisor · MT5 · v1.0 · Free

About Parameter Sensitivity Mapper

Parameter Sensitivity Mapper is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Results file, Chosen value and Neighbor window. MQL source code included.

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

Settings

SettingDefaultWhat it does
Results fileParameterSensitivityMapper_Results.csvFile in MQL5\Files, header + two columns: ParameterValue,Metric
Chosen value0.0The parameter value actually in live use; the nearest row to this is evaluated
Neighbor window2Rows on each side, sorted by parameter value, that define the local neighbourhood
Spike threshold percent25.0Flag as a spike when the chosen row deviates from its neighbourhood average by more than this
Report fileParameterSensitivityMapper_Report.csvPer-row annotated output

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: Grid · Alerts · MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria