Does input group affect the params[] array in IndicatorCreate()?

 

Hi all,

I'm programmatically loading a custom indicator using IndicatorCreate() and passing values for the indicator's input parameters via the params[] array.

My custom indicator uses input group declarations like " " and "--- Tick Density" to visually organize input settings in the parameters dialog. These groups are just for padding and clarity.

Question:
Do input group lines count as parameters when building the params[] array for IndicatorCreate() ? In other words, should I include a slot in params[] for each input group , or are they ignored?

Thanks in advance for your help — just want to make sure the parameter ordering stays in sync!

 
Robert Northen:

Hi all,

I'm programmatically loading a custom indicator using IndicatorCreate() and passing values for the indicator's input parameters via the params[] array.

My custom indicator uses input group declarations like " " and "--- Tick Density" to visually organize input settings in the parameters dialog. These groups are just for padding and clarity.

Question:
Do input group lines count as parameters when building the params[] array for IndicatorCreate() ? In other words, should I include a slot in params[] for each input group , or are they ignored?

Thanks in advance for your help — just want to make sure the parameter ordering stays in sync!

 
Ryan L Johnson #:

Thanks for confirming, Ryan.

Just to be clear, my gripe isn’t with you at all. My frustration is with the documentation itself, which yet again has let me down. There’s absolutely no mention that input group lines count as parameters when using the MQL5 functions IndicatorCreate() or iCustom(), and this behavior is completely counterintuitive.

To explain further for others reading: input group is described in the official documentation as a cosmetic tool — used purely to organize parameters in the UI by creating headings. Nowhere does it state that each input group also acts like a parameter that must be accounted for in the params[] array when passing inputs programmatically.

Yet in practice, that's exactly what happens: if you have 3 input variables and 2 input group declarations, you must provide 5 MqlParam objects, or the values shift and bind incorrectly. That’s critical behavior — and completely undocumented.

As a developer, I shouldn't have to rely on the community or reverse-engineering to uncover basic structural rules like this. This kind of detail should be stated clearly and officially.

Suggestion to MetaQuotes: Please update the documentation for IndicatorCreate() and iCustom() to clearly state that input group lines are counted as parameters. This would save hours of confusion and debugging for anyone trying to use these functions correctly.