Help with icustom()

 

i'm developing EA , i'm trying to get r1,r2... values from pivotlevels.mql indicator

from my ea i calling like

double r1=iCustom(Symbol(),0,"pivotlevels",0,0);

double r2=iCustom(Symbol(),0,"pivotlevels",1,0);

double r3=iCustom(Symbol(),0,"pivotlevels",2,0);

double s1=iCustom(Symbol(),0,"pivotlevels",3,0);

double s2=iCustom(Symbol(),0,"pivotlevels",4,0);

double s3=iCustom(Symbol(),0,"pivotlevels",5,0);

double p=iCustom(Symbol(),0,"pivotlevels",6,0);

but i getting only empty value , can anyone help me with that , i have attached indicator here pivotlevels.mq4

Files:
pivotlevels.mq4  24 kb
 

Some pivot indicators are working with objects not buffers. If that is the case with the one you are calling from iCustom() you are always going to get empty values with iCustom() call. Check in the data window if the indicator places any values at all in the buffers

ssoftware:
i'm developing EA , i'm trying to get r1,r2... values from pivotlevels.mql indicator

from my ea i calling like

double r1=iCustom(Symbol(),0,"pivotlevels",0,0);

double r2=iCustom(Symbol(),0,"pivotlevels",1,0);

double r3=iCustom(Symbol(),0,"pivotlevels",2,0);

double s1=iCustom(Symbol(),0,"pivotlevels",3,0);

double s2=iCustom(Symbol(),0,"pivotlevels",4,0);

double s3=iCustom(Symbol(),0,"pivotlevels",5,0);

double p=iCustom(Symbol(),0,"pivotlevels",6,0);

but i getting only empty value , can anyone help me with that , i have attached indicator here pivotlevels.mq4
 

Thanks malden for your quick replay , i'm new for ea coding , i got lot of information from your previous posts

nothing in data window

how can i get value to my ea , if it stored in objects ?

 

For that way (when objects are used) you have to know the exact names of the objects the indicator is using and then the value you wish to retrieve is retrieved by using ObjectGet( name , property identifier) function

ssoftware:
Thanks malden for your quick replay , i'm new for ea coding , i got lot of information from your previous posts

nothing in data window

how can i get value to my ea , if it stored in objects ?
 

Thanks for your help

i got worked , just replaced new indicator without objects

mladen:
For that way (when objects are used) you have to know the exact names of the objects the indicator is using and then the value you wish to retrieve is retrieved by using ObjectGet( name , property identifier) function
Reason: