i've been away from metrader 4 for a while, so my coding is a little rusty, while creating an indicator, reason has arisen to convert a distance between two datetime variable into a number of bars, i think i may have it, but i'm not so sure about subtraction of datetimes, will these expressions do the trick?
PHP Code:
datetime center_time = ObjectGet(line,OBJPROP_TIME1);//horizontal refrence to center, or left point of line
double center_height = ObjectGet(line,OBJPROP_PRICE1);//vertical refrence to center, or left point of line
datetime radius_time = ObjectGet(line,OBJPROP_TIME2);//horizontal refrence to outer, or right point of line
double radius_height = ObjectGet(line,OBJPROP_PRICE2);//vertical refrence to outer, or right point of line
double Distance_g = (radius_time - center_time)/Period();
line is a variable that represents a line already drawn.
thanks in advance for any and all help.