passing extern parameters to iCustom

 

Is it possible to code an EA that allows the user to enter the name and parameters of a custom indicator so that they can be passed to iCustom() ? I have tried to figure out a way to do this and I have hit the wall, how to get the parameters into iCustom without knowing how many there will be or what type.

 
SDC:

Is it possible to code an EA that allows the user to enter the name and parameters of a custom indicator so that they can be passed to iCustom() ? I have tried to figure out a way to do this and I have hit the wall, how to get the parameters into iCustom without knowing how many there will be or what type.

Off the top of my head . . . get the user to enter a string comma separated of the parameters to pass in the iCustom() call . . . very messy and impossible to verify as correct unless you know about the Indicator up front.
 

yes I think messy is the operative word, I'm suprised this question has not been asked before if it has I couldnt find it. If I could pass the string it wouldnt be that bad, but of course iCustom requires the parameters to be of the correct type..

 
SDC:

Is it possible to code an EA that allows the user to enter the name and parameters of a custom indicator so that they can be passed to iCustom() ? I have tried to figure out a way to do this and I have hit the wall, how to get the parameters into iCustom without knowing how many there will be or what type.

It's possible with mql5, but I don't know if it will be implemented in the new mql4. Currently (beta build 538), it's not.
 
I faced this problem with my commercial stuff and the only fool-proof solution was - no parameters at all. I hardcode the parameters to indicator and save it with a reasonable name, that lets me guess the hardcoded parameters.
 
Ovo:
I faced this problem with my commercial stuff and the only fool-proof solution was - no parameters at all. I hardcode the parameters to indicator and save it with a reasonable name, that let me guess the hardcoded parameters.
If the default externs are suitable the iCustom() call doesn't need them so then they don't need to specified in the EA . . . that might be another solution.
 
Ovo:
I faced this problem with my commercial stuff and the only fool-proof solution was - no parameters at all. I hardcode the parameters to indicator and save it with a reasonable name, that lets me guess the hardcoded parameters.

Yes but if it is a commercial product and the user's have a custom indicator and not have access to the source code or they might not know how to hard code its parameters even if they did have the source code.

 
angevoyageur:
It's possible with mql5, but I don't know if it will be implemented in the new mql4. Currently (beta build 538), it's not.
Yes that mql5 function would solve the problem nicely. I havent given up on doing this in the current mql4 though, I think it might be possible but it wont be pretty.
 
SDC: Yes but if it is a commercial product and the user's have a custom indicator
The custom indicator's externals must match your specified count and types.
 
SDC: Yes that mql5 function would solve the problem nicely. I havent given up on doing this in the current mql4 though, I think it might be possible but it wont be pretty.
I'll grab my pop_corn, this is gonna be very entertaining .
 
SDC:

Yes but if it is a commercial product and the user's have a custom indicator and not have access to the source code or they might not know how to hard code its parameters even if they did have the source code.


You may create a wrapper indicator which would be a proxy to the 'unfriendly' indicator.
Reason: