I'm trying to grab values from an angle object on a chart (see attached picture). I can get the properties like so:
What I can't seem to do is this:
bar1 is the orgin point. bar2 is what I have in the rectangle in the pic. when I try to get the bar, I get either 65000+ or -1 depending on iBarshift exact.
I'm trying to get the "rise/run" out of the angle so in code, so I can tell where the angle's price is on candle 0.
Any ideas? thanks.
Inserted Code
double angleprice2=ObjectGet("Angle",OBJPROP_PRICE2);
double angleprice1=ObjectGet("Angle",OBJPROP_PRICE1);
datetime angletime2=ObjectGet("Angle",OBJPROP_TIME2);
datetime angletime1=ObjectGet("Angle",OBJPROP_TIME1); Inserted Code
int bar1=iBarShift(NULL,0,angletime1,false); int bar2=iBarShift(NULL,0,angletime2,false);
I'm trying to get the "rise/run" out of the angle so in code, so I can tell where the angle's price is on candle 0.
Any ideas? thanks.