ObjectGetValueByShift

 

Hi,

when I use this command : ObjectGetValueByShift("MTRL", 1);

I get error codes like:

4008: not initialized string

or 4205: object coordinates error

but what does that mean? Is there something to initializes before using this instruction. (I have created the TrendLine "MTRL" manually)

Is there a reference page on the error code status?

Thanks for helping

 

Try this


double value;

if(ObjectFind("MTRL") == 0)
{
value = NormalizeDouble(ObjectGetValueByShift("MTRL",1),Digits);

}

 

Do GetLastError() immediately before the operation you are interested in to clear previous errors to eliminate some confusion about errors.

 
phy wrote >>

Do GetLastError() immediately before the operation you are interested in to clear previous errors to eliminate some confusion about errors.

Thanks to both of you. Yours ideas were applied and have brought great satisfaction.