How to get around max number parameters in iCustom ?

Jean Francois Le Bas
1246
Jean Francois Le Bas  

Hi


i got an indicator that has too many parameters for the iCustom function call in an EA.

i got a "'iCustom' - wrong parameters count" error in MT5

how can i get around that problem ? i'd like to be able to change the indicator parameters inside the EA rather than recompiling the indicator with different settings each time

is there a way around it ?


thanks


Jeff

William Roeder
24234
William Roeder  
  1. We can't see your broken code — we can only guess. Always post the relevant code and its context.
  2. The limit IIRC is 63 parameters. Simplify your indicator, or split it into multiple ones.
  3. Have the important parameters listed first so you can default the remaining ones out of the iCustom call.
Jean Francois Le Bas
1246
Jean Francois Le Bas  
William Roeder:
  1. We can't see your broken code — we can only guess. Always post the relevant code and its context.
  2. The limit IIRC is 63 parameters. Simplify your indicator, or split it into multiple ones.
  3. Have the important parameters listed first so you can default the remaining ones out of the iCustom call.

i think i found a way : create an input string that will contain all the parameters of one part of the indi

like :

input string s0 = "1.0;true;2;10;0.001"; and then i can input a lot of parameters into 1 string so it saves many parameters

and i can have all the nice parameters on the EA side and it will convert their values to a string that will be sent to the special indicator version...

i think it should work

but what is the limit of a string size? maybe i'll have to split the params over a few strings

Jeff

Jean Francois Le Bas
1246
Jean Francois Le Bas  
Jean Francois Le Bas:

i think i found a way : create an input string that will contain all the parameters of one part of the indi

like :

input string s0 = "1.0;true;2;10;0.001"; and then i can input a lot of parameters into 1 string so it saves many parameters

and i can have all the nice parameters on the EA side and it will convert their values to a string that will be sent to the special indicator version...

i think it should work

but what is the limit of a string size? maybe i'll have to split the params over a few strings

Jeff

ok i finalized the code and it works fine. And ONE string can hold my 139 parameters (with some doubles)

so it's a viable solution right there ! i just send ONE parameter (the huge string) to the indicator and the indi deals with it and updates the values of the 139 parameters accordingly.

if the string is empty, then it uses the normal "input" values.

it works perfect

Jeff