Help with addinga custom indicator to an ea

 

Howdy,

~When I try to code in the indicator like this:

double lagNow=iCustom(NULL,0,"LaguerreFilter",.7,0,0,1);

it doesnt draw on the chart or take it into account.

~When I code the indicator like this:

double lagNow=iCustom(NULL,0,"LaguerreFilter",0,1);

it works fine.

~My question is how can I code it like double lagNow=iCustom(NULL,0,"LaguerreFilter",.7,0,0,1); so I can change the indicator parameters in the ea code? I'm unsure what I have inccorect.

Thanks,

Kocher

Files:
 

hi, .7 is not a regular expression use 0.7 and you will be fine

//z

 
double X = 0.7;
int    Y = 0;

double lagNow=iCustom(NULL,0,"LaguerreFilter",X,Y,0,1);
try it didn't checked
 
zzuegg:

hi, .7 is not a regular expression use 0.7 and you will be fine

//z


Thanks Zzuegg, adding the 0 worked.

Another question, When doing RSI indicators and similar is there a way to add the levels? So if I want a 30 line or 50 line I could add that in while coding the ea?

 
int X = 14;
double rsi_value = iCustom(NULL, 0, "RSI", X, 0, 0);
 

but for rsi u can use iRSI()

 
kocher:


Thanks Zzuegg, adding the 0 worked.

Another question, When doing RSI indicators and similar is there a way to add the levels? So if I want a 30 line or 50 line I could add that in while coding the ea?

i don't get the point why adding levels. the EA would never be able to see the levels. So normally you check the result of the iRSI() call.

 
zzuegg:

i don't get the point why adding levels. the EA would never be able to see the levels. So normally you check the result of the iRSI() call.


I do not agree with you the The EA also operates on these parameters
 
qjol:

I do not agree with you the The EA also operates on these parameters
jeah, but inside the EA code, no need to submit the levels values to the indicator since it's not possible to read them afterwards. But i am always open to new methods. can you give me a example?
 
zzuegg:
jeah, but inside the EA code, no need to submit the levels values to the indicator since it's not possible to read them afterwards. But i am always open to new methods. can you give me a example?


on this indicator for example https://www.mql5.com/ru/code You get different values by using

double A = iCustom(NULL,0,"Bands+Fibo", 20,0,20,X,Y);//X = Index_Buffer... Y = shift

or by using

double B = iCustom(NULL,0,"Bands+Fibo", 50,0,50,X,Y);//X = Index_Buffer... Y = shift
 

Usually, it comes to use in private indicators

Reason: