Loading…

iCustom Symptom Gallery

iCustom never throws a compile error or a runtime alert when it is called wrong. It hands back a number - sometimes wildly wrong, sometimes just quietly wrong - and there is no error code, no warning, nothing that flags the call itself as the problem. Anyone who has debugged a multi-indicator EA has eventually stared at a value that "looks plausible" and spent an hour before realising the buffer index was off by one, or two parameters were swapped. This script reproduces four of the recurring symptoms against a real companion indicator built specifically to make each one visible: - Wrong buffer index: reading buffer 1 (a deliberately unrelated decoy series) instead of buffer 0 returns a real, believable number that has nothing to do with the intended value. - Wrong parameter order: swapping a double and an int argument compiles and runs without complaint - MQL4 coerces the mismatched types silently rather than rejecting the call. - Missing trailing parameter: leaving out one of the indicator's own input parameters does not error either - the indicator quietly falls back to its own compiled default instead of the value the caller assumed. - Out-of-range shift: asking for a bar shift past the loaded history returns 0, indistinguishable from a genuine reading of zero unless the caller checks iBars() first. Each scenario prints the value it actually returned next to what a correctly-formed call returns for the same bar, so the size and shape of each mistake's damage is visible directly, not just described. Notes and limitations - This is a genuinely two-file submission: the gallery script and its companion indicator both need to be installed for the demonstration to work, because iCustom's failure modes cannot be shown without a second, real indicator to call incorrectly. This is stated plainly here rather than left implicit. - The companion indicator's decoy buffer and non-zero default shift bias exist purely to make each symptom's damage visible at a glance; it has no other purpose and is not meant to be used as a real trading indicator. - Scenario 5 depends on iCustom's return of 0 for an out-of-range shift, which is standard, documented MQL4 behaviour, not a defect in the companion indicator. - This is a demonstration and diagnostic tool only. It never places, modifies or closes a trade.

Script · MT5 · v1.0 · Free

About iCustom Symptom Gallery

iCustom Symptom Gallery is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Indicator name, Multiplier and Test shift. MQL source code included.

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

Settings

SettingDefaultWhat it does
Indicator nameICustomSymptomGallerySourceName of the companion indicator, must already be installed in MQL5\Indicators\
Multiplier3.0The correct InpMultiplier value used for every "intended" call in this gallery
Test shift5Bar shift used for every scenario (needs at least this many bars of history)

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: Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria