Traiangle coordinates error

 

I have the following code- for points 1,2 & 3 of a triangle

Price1 is declared as double and Time1 as datetime

Price1   = ObjectGetDouble       (0,objName,OBJPROP_PRICE1 ,0); 
Time1    = ObjectGetTimeByValue  (0,objName,Price1 ,0); 

The prices are as expected for all points

but get the following error and not sure what I need to do to correct the problem.

4205 object coordinates error

Perhaps I need something other than ,0 after Price1 but can't find what I may need.


Any help appreciated.

 
Peter Williams:

Time1    = ObjectGetTimeByValue  (0,objName,Price1 ,0); 

Perhaps you should read the manual. Where in ObjectGetTimeByValue or ObjectGetValueByTime do you see triangle is valid.
   How To Ask Questions The Smart Way. 2004
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.