Hello
I’m trying to make an ea where the user can type the name of the indicator in the ea settings and type list of comma separated parameters.
next i want to detect the type of every parameter and then pass it to the iCustom.
and to check if this parameter is string or double i tell the user if it string leave it as default
the default parameter is 5555
so here is the check
if(parameter1==5555){ string par1="string1"; } else{double par1=parameter1;}
and so on for the next parameters then at the end of the check and declaration of parameters i call the indicator
iCustom(_Symbol,_Period,indicator_name,par1,par2,par3,par4,indicator_buffer,1);
the problem is that the defined variables are only accessed in the if statement scope
tried to create a function inside it and return the value and use function overloading but didn’t work as it’s not allowed to create function inside a function.
so i need any way to make the local variables accessed in the ontick scope.
Please help.